Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 00:06:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 00:06:25 +0300
commit0ff031c7f4e2c7fe1b671b30fef569eb3fbea942 (patch)
tree0493e9faf4bb9d69c06226901cea12f22714a92a /spec/models
parent7b8ec6e718331dd1f8330f08f49f01ba2c20b84c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/concerns/atomic_internal_id_spec.rb41
1 files changed, 11 insertions, 30 deletions
diff --git a/spec/models/concerns/atomic_internal_id_spec.rb b/spec/models/concerns/atomic_internal_id_spec.rb
index 80f296d8825..0605392c0aa 100644
--- a/spec/models/concerns/atomic_internal_id_spec.rb
+++ b/spec/models/concerns/atomic_internal_id_spec.rb
@@ -22,41 +22,22 @@ describe AtomicInternalId do
end
context 'when value is set by ensure_project_iid!' do
- context 'with iid_always_track false' do
- before do
- stub_feature_flags(iid_always_track: false)
- end
+ it 'does not track the value' do
+ expect(InternalId).not_to receive(:track_greatest)
- it 'does not track the value' do
- expect(InternalId).not_to receive(:track_greatest)
-
- milestone.ensure_project_iid!
- subject
- end
-
- it 'tracks the iid for the scope that is actually present' do
- milestone.iid = external_iid
-
- expect(InternalId).to receive(:track_greatest).once.with(milestone, scope_attrs, usage, external_iid, anything)
- expect(InternalId).not_to receive(:generate_next)
-
- # group scope is not present here, the milestone does not have a group
- milestone.track_group_iid!
- subject
- end
+ milestone.ensure_project_iid!
+ subject
end
- context 'with iid_always_track enabled' do
- before do
- stub_feature_flags(iid_always_track: true)
- end
+ it 'tracks the iid for the scope that is actually present' do
+ milestone.iid = external_iid
- it 'does not track the value' do
- expect(InternalId).to receive(:track_greatest)
+ expect(InternalId).to receive(:track_greatest).once.with(milestone, scope_attrs, usage, external_iid, anything)
+ expect(InternalId).not_to receive(:generate_next)
- milestone.ensure_project_iid!
- subject
- end
+ # group scope is not present here, the milestone does not have a group
+ milestone.track_group_iid!
+ subject
end
end
end