Created
May 18, 2011 18:53
-
-
Save contacthrk/979254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 6645cf1a01cc68a69b31214f1a0266137f8c0c7a Mon Sep 17 00:00:00 2001 | |
From: hemant <contacthrk@gmail.com> | |
Date: Fri, 13 May 2011 14:16:23 +0530 | |
Subject: [PATCH] failing test for lh#6217 | |
--- | |
.../has_many_through_associations_test.rb | 9 +++++++++ | |
1 files changed, 9 insertions(+), 0 deletions(-) | |
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb | |
index 8911759..a0ec6ad 100644 | |
--- a/activerecord/test/cases/associations/has_many_through_associations_test.rb | |
+++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb | |
@@ -766,4 +766,13 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase | |
assert_equal [category.name], post.named_category_ids # checks when target loaded | |
assert_equal [category.name], post.reload.named_category_ids # checks when target no loaded | |
end | |
+ | |
+ def test_create_should_not_raise_exception_when_join_record_has_errors | |
+ repair_validations(Subscription) do | |
+ Subscription.validate {|r| r.errors[:base] << 'Invalid Subscription' } | |
+ assert_nothing_raised do | |
+ Subscriber.create(:nick => "nick123", :name => "Luke", :books => [Book.first]) | |
+ end | |
+ end | |
+ end | |
end | |
-- | |
1.6.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment