Constants in specs
This commit is contained in:
parent
c87540ed46
commit
8e97323d49
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue