aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations/join_model_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-07-11 23:54:43 +0000
committerMichael Koziarski <michael@koziarski.com>2007-07-11 23:54:43 +0000
commit816522ecd8615bf96e8b932ac358fe9346b286ee (patch)
treece3aeee6243bfb04b9e3ad1743734b33cbf74bdd /activerecord/test/associations/join_model_test.rb
parentd4d4a08f6b064e47145b1abaca803654957f7a03 (diff)
downloadrails-816522ecd8615bf96e8b932ac358fe9346b286ee.tar.gz
rails-816522ecd8615bf96e8b932ac358fe9346b286ee.tar.bz2
rails-816522ecd8615bf96e8b932ac358fe9346b286ee.zip
Make create! on a has_many :through association return the association object. Not the collection. Closes #8786 [lifofifo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7182 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/associations/join_model_test.rb')
-rw-r--r--activerecord/test/associations/join_model_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/associations/join_model_test.rb b/activerecord/test/associations/join_model_test.rb
index 2e1b4dae88..a784a8eefd 100644
--- a/activerecord/test/associations/join_model_test.rb
+++ b/activerecord/test/associations/join_model_test.rb
@@ -422,7 +422,7 @@ class AssociationsJoinModelTest < Test::Unit::TestCase
assert_equal(count + 1, post_thinking.tags.size)
assert_equal(count + 1, post_thinking.tags(true).size)
- assert_nothing_raised { post_thinking.tags.create!(:name => 'foo') }
+ assert_kind_of Tag, post_thinking.tags.create!(:name => 'foo')
assert_nil( wrong = post_thinking.tags.detect { |t| t.class != Tag },
message = "Expected a Tag in tags collection, got #{wrong.class}.")
assert_nil( wrong = post_thinking.taggings.detect { |t| t.class != Tagging },