diff options
Diffstat (limited to 'spec/support/shared_examples')
-rw-r--r-- | spec/support/shared_examples/models/runners_token_prefix_shared_examples.rb | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/spec/support/shared_examples/models/runners_token_prefix_shared_examples.rb b/spec/support/shared_examples/models/runners_token_prefix_shared_examples.rb index bbce67ae7b9..4dce445ac73 100644 --- a/spec/support/shared_examples/models/runners_token_prefix_shared_examples.rb +++ b/spec/support/shared_examples/models/runners_token_prefix_shared_examples.rb @@ -1,35 +1,13 @@ # frozen_string_literal: true -RSpec.shared_examples 'it has a prefixable runners_token' do |feature_flag| - context 'feature flag enabled' do - before do - stub_feature_flags(feature_flag => [subject]) +RSpec.shared_examples 'it has a prefixable runners_token' do + describe '#runners_token' do + it 'has a runners_token_prefix' do + expect(subject.runners_token_prefix).not_to be_empty end - describe '#runners_token' do - it 'has a runners_token_prefix' do - expect(subject.runners_token_prefix).not_to be_empty - end - - it 'starts with the runners_token_prefix' do - expect(subject.runners_token).to start_with(subject.runners_token_prefix) - end - end - end - - context 'feature flag disabled' do - before do - stub_feature_flags(feature_flag => false) - end - - describe '#runners_token' do - it 'does not have a runners_token_prefix' do - expect(subject.runners_token_prefix).to be_empty - end - - it 'starts with the runners_token_prefix' do - expect(subject.runners_token).to start_with(subject.runners_token_prefix) - end + it 'starts with the runners_token_prefix' do + expect(subject.runners_token).to start_with(subject.runners_token_prefix) end end end |