Skip to content
Browse files

added regression test

  • Loading branch information...
1 parent 152c41d commit 1df2286f81590c6fcf707e54fa8d647974641531 @sirlantis sirlantis committed May 27, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 activerecord/test/cases/associations/has_many_through_associations_test.rb
View
4 activerecord/test/cases/associations/has_many_through_associations_test.rb
@@ -471,6 +471,10 @@ def test_count_has_many_through_with_named_scope
assert_equal 1, authors(:mary).categories.general.count
end
+ def test_has_many_through_on_new_record
+ assert_equal [], Post.new.tags.all
+ end
+
def test_joining_has_many_through_belongs_to
posts = Post.joins(:author_categorizations).
where('categorizations.id' => categorizations(:mary_thinking_sti).id)

0 comments on commit 1df2286

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