diff options
Diffstat (limited to 'qa/spec/runtime/env_spec.rb')
-rw-r--r-- | qa/spec/runtime/env_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/qa/spec/runtime/env_spec.rb b/qa/spec/runtime/env_spec.rb index 340831aa06d..0a0bf33a726 100644 --- a/qa/spec/runtime/env_spec.rb +++ b/qa/spec/runtime/env_spec.rb @@ -230,6 +230,20 @@ describe QA::Runtime::Env do end end + describe '.require_admin_access_token!' do + it 'raises ArgumentError if GITLAB_QA_ADMIN_ACCESS_TOKEN is not specified' do + stub_env('GITLAB_QA_ADMIN_ACCESS_TOKEN', nil) + + expect { described_class.require_admin_access_token! }.to raise_error(ArgumentError) + end + + it 'does not raise exception if GITLAB_QA_ADMIN_ACCESS_TOKEN is specified' do + stub_env('GITLAB_QA_ADMIN_ACCESS_TOKEN', 'foobar123') + + expect { described_class.require_admin_access_token! }.not_to raise_error + end + end + describe '.log_destination' do it 'returns $stdout if QA_LOG_PATH is not defined' do stub_env('QA_LOG_PATH', nil) |