Fix failing spec/models/internal_id_spec.rb spec

The spec is too strict about how many `current_version` should be
called - if the spec is called separately, it's called 3 times, if
all specs run it's called twice.

This is similar to the change done in
9b75279162
This commit is contained in:
Jan Provaznik 2019-06-26 14:33:57 +00:00 committed by Stan Hu
parent 05a7fcbdf7
commit 813b8aad24
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ describe InternalId do
before do
described_class.reset_column_information
# Project factory will also call the current_version
expect(ActiveRecord::Migrator).to receive(:current_version).twice.and_return(InternalId::REQUIRED_SCHEMA_VERSION - 1)
expect(ActiveRecord::Migrator).to receive(:current_version).at_least(:once).and_return(InternalId::REQUIRED_SCHEMA_VERSION - 1)
end
it 'does not reset any of the iids' do