Skip to content
Browse files

Ensure nested attrs on band before spec

  • Loading branch information...
1 parent 5350182 commit fec64f88bb071e7a212b29044985e05f99461e6d @durran durran committed Sep 1, 2012
Showing with 1 addition and 2 deletions.
  1. +0 −2 spec/app/models/band.rb
  2. +1 −0 spec/mongoid/callbacks_spec.rb
View
2 spec/app/models/band.rb
@@ -15,8 +15,6 @@ class Band
embeds_many :notes, as: :noteable, cascade_callbacks: true, validate: false
embeds_one :label, cascade_callbacks: true
- accepts_nested_attributes_for :records, allow_destroy: true
-
after_upsert do |doc|
doc.upserted = true
end
View
1 spec/mongoid/callbacks_spec.rb
@@ -435,6 +435,7 @@ class TestClass
end
it "does not cascade to the child" do
+ Band.accepts_nested_attributes_for :records, allow_destroy: true
band.update_attributes(attributes).should be_true
end
end

0 comments on commit fec64f8

Please sign in to comment.
Something went wrong with that request. Please try again.