Skip to content

Commit

Permalink
Ensure nested attrs on band before spec
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Sep 1, 2012
1 parent 5350182 commit fec64f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions spec/app/models/band.rb
Expand Up @@ -15,8 +15,6 @@ class Band
embeds_many :notes, as: :noteable, cascade_callbacks: true, validate: false embeds_many :notes, as: :noteable, cascade_callbacks: true, validate: false
embeds_one :label, cascade_callbacks: true embeds_one :label, cascade_callbacks: true


accepts_nested_attributes_for :records, allow_destroy: true

after_upsert do |doc| after_upsert do |doc|
doc.upserted = true doc.upserted = true
end end
Expand Down
1 change: 1 addition & 0 deletions spec/mongoid/callbacks_spec.rb
Expand Up @@ -435,6 +435,7 @@ class TestClass
end end


it "does not cascade to the child" do it "does not cascade to the child" do
Band.accepts_nested_attributes_for :records, allow_destroy: true
band.update_attributes(attributes).should be_true band.update_attributes(attributes).should be_true
end end
end end
Expand Down

0 comments on commit fec64f8

Please sign in to comment.