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

Include people and readers fixtures to fix test isolation error

This commit is contained in:
Jeremy Kemper 2008-08-26 02:38:48 -07:00
parent 0c7bbc72fc
commit ab1e82b8f7

View file

@ -27,7 +27,7 @@ require 'models/sponsor'
class AssociationsTest < ActiveRecord::TestCase
fixtures :accounts, :companies, :developers, :projects, :developers_projects,
:computers
:computers, :people, :readers
def test_include_with_order_works
assert_nothing_raised {Account.find(:first, :order => 'id', :include => :firm)}
@ -45,7 +45,7 @@ class AssociationsTest < ActiveRecord::TestCase
assert_equal [], person.readers.find(:all)
person.save!
reader = Reader.create! :person => person, :post => Post.new(:title => "foo", :body => "bar")
assert_equal [reader], person.readers.find(:all)
assert person.readers.find(reader.id)
end
def test_force_reload