Commit 8e97323d authored by Jacob Vosmaer's avatar Jacob Vosmaer

Constants in specs

parent c87540ed
...@@ -63,7 +63,7 @@ describe Gitlab::Workhorse, lib: true do ...@@ -63,7 +63,7 @@ describe Gitlab::Workhorse, lib: true do
end end
describe '#verify_api_request!' do 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' } } let(:payload) { { 'iss' => 'gitlab-workhorse' } }
it 'accepts a correct header' do it 'accepts a correct header' do
......
...@@ -253,7 +253,7 @@ describe Ci::API::API do ...@@ -253,7 +253,7 @@ describe Ci::API::API do
end end
it "reject requests that did not go through gitlab-workhorse" do 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 post authorize_url, { token: build.token }, headers
expect(response).to have_http_status(500) expect(response).to have_http_status(500)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment