summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2018-05-02 13:09:33 +0200
committerAndreas Brandl <abrandl@gitlab.com>2018-05-02 13:09:33 +0200
commit33c9d0e13bd7211acbccce9ffd72fcef2267e703 (patch)
tree2266c3362a1550a0ff58f7ef29a3ecfc659b3052
parent5ce4df7fabba760c5b0c3ead50c8af08d77e450c (diff)
downloadgitlab-ce-ab-per-project-pipeline-iid.tar.gz
Fix shared example for AtomicInternalId.ab-per-project-pipeline-iid
The problem is with a factory chain where something down the chain also requires an iid to be set. For this, the before block was too generic and would just blank out all iid fields.
-rw-r--r--spec/support/shared_examples/models/atomic_internal_id_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/shared_examples/models/atomic_internal_id_spec.rb b/spec/support/shared_examples/models/atomic_internal_id_spec.rb
index 6a6e13418a9..c64c0381d81 100644
--- a/spec/support/shared_examples/models/atomic_internal_id_spec.rb
+++ b/spec/support/shared_examples/models/atomic_internal_id_spec.rb
@@ -12,7 +12,7 @@ shared_examples_for 'AtomicInternalId' do
subject { instance }
before do
- allow(InternalId).to receive(:generate_next).and_return(nil)
+ allow(InternalId).to receive(:generate_next).with(instance, scope_attrs, usage, anything).and_return(nil)
end
it { is_expected.to validate_presence_of(internal_id_attribute) }