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
path: root/qa/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-09 15:08:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-09 15:08:52 +0300
commitb90d8b54a4d623e52cf1d4318023e3b18d13dd5b (patch)
tree19012dcd9dff32ef1c47182229bdabb6b078a7fc /qa/spec
parenta989894b49e6c72648485a82c570647c17a3763f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/spec')
-rw-r--r--qa/spec/runtime/api/client_spec.rb2
-rw-r--r--qa/spec/runtime/env_spec.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/qa/spec/runtime/api/client_spec.rb b/qa/spec/runtime/api/client_spec.rb
index dd139fda980..36ee563de39 100644
--- a/qa/spec/runtime/api/client_spec.rb
+++ b/qa/spec/runtime/api/client_spec.rb
@@ -60,7 +60,7 @@ RSpec.describe QA::Runtime::API::Client do
end
it 'returns a created token' do
- client = described_class.new(user: { username: 'foo' })
+ client = described_class.new(user: Struct.new(:username, :admin?).new('foo', false))
expect(client).to receive(:create_personal_access_token).and_return('created_token')
diff --git a/qa/spec/runtime/env_spec.rb b/qa/spec/runtime/env_spec.rb
index 3396ae6f0b8..5a98721466f 100644
--- a/qa/spec/runtime/env_spec.rb
+++ b/qa/spec/runtime/env_spec.rb
@@ -232,6 +232,7 @@ RSpec.describe QA::Runtime::Env do
describe '.require_admin_access_token!' do
it 'raises ArgumentError if GITLAB_QA_ADMIN_ACCESS_TOKEN is not specified' do
+ described_class.instance_variable_set(:@admin_personal_access_token, nil)
stub_env('GITLAB_QA_ADMIN_ACCESS_TOKEN', nil)
expect { described_class.require_admin_access_token! }.to raise_error(ArgumentError)