Constants in specs
This commit is contained in:
parent
c87540ed46
commit
8e97323d49
|
@ -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
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue