diff options
Diffstat (limited to 'spec/models/ci/job_token/scope_spec.rb')
-rw-r--r-- | spec/models/ci/job_token/scope_spec.rb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/models/ci/job_token/scope_spec.rb b/spec/models/ci/job_token/scope_spec.rb index 9ae061a3702..7aa861a3dab 100644 --- a/spec/models/ci/job_token/scope_spec.rb +++ b/spec/models/ci/job_token/scope_spec.rb @@ -63,12 +63,14 @@ RSpec.describe Ci::JobToken::Scope, feature_category: :continuous_integration, f subject { scope.add!(new_project, direction: direction, user: user) } [:inbound, :outbound].each do |d| - let(:direction) { d } + context "with #{d}" do + let(:direction) { d } - it 'adds the project' do - subject + it 'adds the project' do + subject - expect(scope.send("#{direction}_projects")).to contain_exactly(current_project, new_project) + expect(scope.send("#{direction}_projects")).to contain_exactly(current_project, new_project) + end end end @@ -160,13 +162,5 @@ RSpec.describe Ci::JobToken::Scope, feature_category: :continuous_integration, f include_examples 'enforces outbound scope only' end - - context 'when inbound scope flag disabled' do - before do - stub_feature_flags(ci_inbound_job_token_scope: false) - end - - include_examples 'enforces outbound scope only' - end end end |