Add pagination to alerts index

This commit is contained in:
2025-10-08 00:50:00 -07:00
parent adcaf46d33
commit d43483a7ad
5 changed files with 46 additions and 2 deletions

15
spec/models/park_spec.rb Normal file
View File

@@ -0,0 +1,15 @@
require 'rails_helper'
RSpec.describe Park, type: :model do
describe "#alerts" do
it "has alerts" do
expect(parks(:one).alerts).to eq([alerts(:one)])
end
it "destroys dependent alerts" do
expect do
parks(:one).destroy!
end.to change(Alert, :count).by(-1)
end
end
end