Add pagination to alerts index
This commit is contained in:
15
spec/models/park_spec.rb
Normal file
15
spec/models/park_spec.rb
Normal 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
|
||||
Reference in New Issue
Block a user