summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2019-06-25 13:00:28 +0200
committerJan Provaznik <jprovaznik@gitlab.com>2019-06-25 14:03:49 +0200
commitcab24c88a5fa512d510bd5d888bb46ef20097d49 (patch)
treec4c80c442d4e4d891dca81f9f38b2ca737ee27bf
parente8aff8351e7de96c51cdc5c2f1af41fc85c7b57f (diff)
downloadgitlab-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.rb2
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