mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't expect fixtures to be returned in the order they were inserted.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
68b19ea7f3
commit
dedb9c8483
2 changed files with 6 additions and 5 deletions
|
@ -734,7 +734,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
|
|||
active_record = Project.find(1)
|
||||
assert !active_record.developers.empty?
|
||||
assert_equal 2, active_record.developers.size
|
||||
assert_equal david.name, active_record.developers.first.name
|
||||
assert active_record.developers.include?(david)
|
||||
end
|
||||
|
||||
def test_adding_single
|
||||
|
|
|
@ -280,8 +280,9 @@ class FinderTest < Test::Unit::TestCase
|
|||
developers_on_project_one = Developer.find :all, :joins => 'developers_projects', :conditions => 'id=developer_id AND project_id=1'
|
||||
|
||||
assert_equal 2, developers_on_project_one.length
|
||||
assert_equal 'David', developers_on_project_one.first.name
|
||||
assert_equal 'Jamis', developers_on_project_one.last.name
|
||||
developer_names = developers_on_project_one.map { |d| d.name }
|
||||
assert developer_names.include?('David')
|
||||
assert developer_names.include?('Jamis')
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
Loading…
Reference in a new issue