diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2019-06-25 13:00:28 +0200 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2019-06-25 14:03:49 +0200 |
commit | cab24c88a5fa512d510bd5d888bb46ef20097d49 (patch) | |
tree | c4c80c442d4e4d891dca81f9f38b2ca737ee27bf | |
parent | e8aff8351e7de96c51cdc5c2f1af41fc85c7b57f (diff) | |
download | gitlab-ce-jprovazn-internal-id-spec.tar.gz |
Fix failing spec/models/internal_id_spec.rb specjprovazn-internal-id-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
9b752791624ce618810b9d65251582e56c37dee7
-rw-r--r-- | spec/models/internal_id_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/internal_id_spec.rb b/spec/models/internal_id_spec.rb index 806b4f61bd8..28630f7d3fe 100644 --- a/spec/models/internal_id_spec.rb +++ b/spec/models/internal_id_spec.rb @@ -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 |