diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-07-10 17:00:43 +0200 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-07-10 17:00:43 +0200 |
commit | 063f03b9d7c6f53def50f337e3da24585d1a837a (patch) | |
tree | b9b3af6c55d5e6aee234ab31fac38b8b07d73333 /spec | |
parent | 2951a09967db1ec18050c2b94fe8d809d7ee966f (diff) | |
download | gitlab-ce-063f03b9d7c6f53def50f337e3da24585d1a837a.tar.gz |
Differentiate shared test context using options hash instead of subject.33949-remove-healthcheck-access-token
+ fix typos, and capitalization
+ point configuration to `gitlab.rb` as well
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/health_check_controller_spec.rb | 6 | ||||
-rw-r--r-- | spec/controllers/health_controller_spec.rb | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/spec/controllers/health_check_controller_spec.rb b/spec/controllers/health_check_controller_spec.rb index 72a5602f23e..03da6287774 100644 --- a/spec/controllers/health_check_controller_spec.rb +++ b/spec/controllers/health_check_controller_spec.rb @@ -36,7 +36,7 @@ describe HealthCheckController do expect(response.content_type).to eq 'text/plain' end - it 'supports successful plaintest response' do + it 'supports passing the token in query params' do get :index, token: token expect(response).to be_success @@ -50,7 +50,7 @@ describe HealthCheckController do allow(Gitlab::RequestContext).to receive(:client_ip).and_return(whitelisted_ip) end - it 'supports successful plaintest response' do + it 'supports successful plaintext response' do get :index expect(response).to be_success @@ -97,7 +97,7 @@ describe HealthCheckController do allow(Gitlab::RequestContext).to receive(:client_ip).and_return(whitelisted_ip) end - it 'supports failure plaintest response' do + it 'supports failure plaintext response' do get :index expect(response).to have_http_status(500) diff --git a/spec/controllers/health_controller_spec.rb b/spec/controllers/health_controller_spec.rb index ce79f068fa1..94d2b420a4e 100644 --- a/spec/controllers/health_controller_spec.rb +++ b/spec/controllers/health_controller_spec.rb @@ -15,7 +15,9 @@ describe HealthController do describe '#readiness' do shared_context 'endpoint responding with readiness data' do - subject { get :readiness } + let(:request_params) { {} } + + subject { get :readiness, request_params } it 'responds with readiness checks data' do subject @@ -58,7 +60,7 @@ describe HealthController do context 'token passed as URL param' do it_behaves_like 'endpoint responding with readiness data' do - subject { get :readiness, token: token } + let(:request_params) { { token: token } } end end end |