Skip to content

Commit

Permalink
Add passing spec for #1809
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Mar 10, 2012
1 parent 543e4d4 commit 661b8e2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/functional/mongoid/callbacks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@

context "when cascading callbacks" do

context "when attempting to cascade on a referenced relation" do

it "raises an error" do
expect {
Band.has_and_belongs_to_many :tags, cascade_callbacks: true
}.to raise_error(Mongoid::Errors::InvalidOptions)
end
end

context "when the documents are embedded one level" do

describe "#after_create" do
Expand Down

0 comments on commit 661b8e2

Please sign in to comment.