diff options
author | rpereira2 <rpereira@gitlab.com> | 2019-04-03 11:02:45 +0300 |
---|---|---|
committer | rpereira2 <rpereira@gitlab.com> | 2019-04-04 23:42:33 +0300 |
commit | eac3e2302c4155ed1890e39b7124672d79b795b6 (patch) | |
tree | ff18a0b08e912e076e2493a94ab0b37abf4afcaf /spec/controllers | |
parent | 4a0c8b4a9c25257d9f0addfbc603f2bac80b63db (diff) |
Add spec for invalid environment id
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/environments/prometheus_api_controller_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/projects/environments/prometheus_api_controller_spec.rb b/spec/controllers/projects/environments/prometheus_api_controller_spec.rb index d9ff420b682..2cabb3f75d2 100644 --- a/spec/controllers/projects/environments/prometheus_api_controller_spec.rb +++ b/spec/controllers/projects/environments/prometheus_api_controller_spec.rb @@ -124,6 +124,16 @@ describe Projects::Environments::PrometheusApiController do end end end + + context 'with invalid environment id' do + let(:other_environment) { create(:environment) } + + it 'returns 404' do + get :proxy, params: environment_params(id: other_environment.id) + + expect(response).to have_gitlab_http_status(:not_found) + end + end end private |