1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fixing test for named_scope through a has_many :through

The test that checks if a has_many :through association has access to named_scope had a typo and
didn't have the proper fixtures loaded. [#190 state:resolved]
This commit is contained in:
Rodrigo Kochenburger 2008-05-13 22:08:31 -03:00 committed by rick
parent fc02eabf29
commit 5a3fd46d42

View file

@ -6,7 +6,7 @@ require 'models/reply'
require 'models/author'
class NamedScopeTest < ActiveRecord::TestCase
fixtures :posts, :authors, :topics
fixtures :posts, :authors, :topics, :comments
def test_implements_enumerable
assert !Topic.find(:all).empty?
@ -95,7 +95,7 @@ class NamedScopeTest < ActiveRecord::TestCase
end
def test_has_many_through_associations_have_access_to_named_scopes
assert_not_equal Comment.containing_the_letter_e, authors(:david).posts
assert_not_equal Comment.containing_the_letter_e, authors(:david).comments
assert !Comment.containing_the_letter_e.empty?
assert_equal authors(:david).comments & Comment.containing_the_letter_e, authors(:david).comments.containing_the_letter_e