Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View failing_test_issue_796.diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
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
Something went wrong with that request. Please try again.