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:
parent
0c7bbc72fc
commit
ab1e82b8f7
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ require 'models/sponsor'
|
||||||
|
|
||||||
class AssociationsTest < ActiveRecord::TestCase
|
class AssociationsTest < ActiveRecord::TestCase
|
||||||
fixtures :accounts, :companies, :developers, :projects, :developers_projects,
|
fixtures :accounts, :companies, :developers, :projects, :developers_projects,
|
||||||
:computers
|
:computers, :people, :readers
|
||||||
|
|
||||||
def test_include_with_order_works
|
def test_include_with_order_works
|
||||||
assert_nothing_raised {Account.find(:first, :order => 'id', :include => :firm)}
|
assert_nothing_raised {Account.find(:first, :order => 'id', :include => :firm)}
|
||||||
|
@ -45,7 +45,7 @@ class AssociationsTest < ActiveRecord::TestCase
|
||||||
assert_equal [], person.readers.find(:all)
|
assert_equal [], person.readers.find(:all)
|
||||||
person.save!
|
person.save!
|
||||||
reader = Reader.create! :person => person, :post => Post.new(:title => "foo", :body => "bar")
|
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
|
end
|
||||||
|
|
||||||
def test_force_reload
|
def test_force_reload
|
||||||
|
|
Loading…
Reference in a new issue