Skip to content

Commit

Permalink
test case for rails#3951 => failing
Browse files Browse the repository at this point in the history
  • Loading branch information
senny committed Dec 2, 2012
1 parent 7730655 commit 6c44155
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Expand Up @@ -1313,6 +1313,10 @@ def test_has_many_through_respects_hash_conditions
assert_equal authors(:david).hello_post_comments, authors(:david).hello_post_comments_with_hash_conditions
end

def test_has_many_scope_lets_you_override_default_join_condition
assert_not_equal [], authors(:david).comments_with_relation
end

def test_include_uses_array_include_after_loaded
firm = companies(:first_firm)
firm.clients.load_target
Expand Down
1 change: 1 addition & 0 deletions activerecord/test/models/author.rb
Expand Up @@ -23,6 +23,7 @@ def testing_proxy_target
has_one :post_about_thinking, -> { where("posts.title like '%thinking%'") }, :class_name => 'Post'
has_one :post_about_thinking_with_last_comment, -> { where("posts.title like '%thinking%'").includes(:last_comment) }, :class_name => 'Post'
has_many :comments, :through => :posts
has_many :comments_with_relation, ->(author) { joins(:post).where('posts.author_id = ?', author.id) }, :class_name => 'Comment'
has_many :comments_containing_the_letter_e, :through => :posts, :source => :comments
has_many :comments_with_order_and_conditions, -> { order('comments.body').where("comments.body like 'Thank%'") }, :through => :posts, :source => :comments
has_many :comments_with_include, -> { includes(:post) }, :through => :posts, :source => :comments
Expand Down

0 comments on commit 6c44155

Please sign in to comment.