Skip to content

Commit

Permalink
New spec for the before_destroy callback.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkomanek committed Jul 10, 2018
1 parent 06cb29e commit 9e1380e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/models/generic_object_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,14 @@
go.remove_from_service(service)
expect(service.generic_objects).to be_blank
end

it 'removes the generic object from all related services before destroy' do
go.add_to_service(service)
expect(service.generic_objects).to include(go)

go.destroy
expect(service.generic_objects).to be_blank
end
end

context "custom buttons" do
Expand Down

0 comments on commit 9e1380e

Please sign in to comment.