mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #19177 from gregmolnar/fixtures
Added testcase for #18742
This commit is contained in:
commit
90387e3e6d
2 changed files with 4 additions and 6 deletions
|
@ -539,12 +539,10 @@ module ActiveRecord
|
|||
conn.insert_fixture(row, fixture_set_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Cap primary key sequences to max(pk).
|
||||
if connection.respond_to?(:reset_pk_sequence!)
|
||||
fixture_sets.each do |fs|
|
||||
connection.reset_pk_sequence!(fs.table_name)
|
||||
# Cap primary key sequences to max(pk).
|
||||
if conn.respond_to?(:reset_pk_sequence!)
|
||||
conn.reset_pk_sequence!(fs.table_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -327,7 +327,7 @@ if Account.connection.respond_to?(:reset_pk_sequence!)
|
|||
fixtures :companies
|
||||
|
||||
def setup
|
||||
@instances = [Account.new(:credit_limit => 50), Company.new(:name => 'RoR Consulting')]
|
||||
@instances = [Account.new(:credit_limit => 50), Company.new(:name => 'RoR Consulting'), Course.new(name: 'Test')]
|
||||
ActiveRecord::FixtureSet.reset_cache # make sure tables get reinitialized
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue