summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2016-09-06 17:26:16 +0200
committerJacob Vosmaer <jacob@gitlab.com>2016-09-06 17:26:16 +0200
commit8e97323d490129b666d01f76412b57f0ccb0c909 (patch)
treed4dce06c25ff8288113665ad142388db70bfd8ce
parentc87540ed46ba8756154f767be99f80be75c27a43 (diff)
downloadgitlab-ce-8e97323d490129b666d01f76412b57f0ccb0c909.tar.gz
Constants in specs
-rw-r--r--spec/lib/gitlab/workhorse_spec.rb2
-rw-r--r--spec/requests/ci/api/builds_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb
index 63032d43027..395192149a9 100644
--- a/spec/lib/gitlab/workhorse_spec.rb
+++ b/spec/lib/gitlab/workhorse_spec.rb
@@ -63,7 +63,7 @@ describe Gitlab::Workhorse, lib: true do
end
describe '#verify_api_request!' do
- let(:header_key) { described_class.const_get('INTERNAL_API_REQUEST_HEADER') }
+ let(:header_key) { described_class::INTERNAL_API_REQUEST_HEADER }
let(:payload) { { 'iss' => 'gitlab-workhorse' } }
it 'accepts a correct header' do
diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb
index 29a194b31f6..9e390bea50b 100644
--- a/spec/requests/ci/api/builds_spec.rb
+++ b/spec/requests/ci/api/builds_spec.rb
@@ -253,7 +253,7 @@ describe Ci::API::API do
end
it "reject requests that did not go through gitlab-workhorse" do
- headers.delete('Gitlab-Workhorse-Api-Request')
+ headers.delete(Gitlab::Workhorse::INTERNAL_API_REQUEST_HEADER)
post authorize_url, { token: build.token }, headers
expect(response).to have_http_status(500)
end