diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/controllers/projects/service_hook_logs_controller_spec.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) | |
download | gitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/controllers/projects/service_hook_logs_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/service_hook_logs_controller_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/controllers/projects/service_hook_logs_controller_spec.rb b/spec/controllers/projects/service_hook_logs_controller_spec.rb index 040e59fc822..9caa4a06b44 100644 --- a/spec/controllers/projects/service_hook_logs_controller_spec.rb +++ b/spec/controllers/projects/service_hook_logs_controller_spec.rb @@ -27,6 +27,15 @@ RSpec.describe Projects::ServiceHookLogsController do specify do expect(response).to be_successful end + + it 'renders a 404 if the hook does not exist' do + log_params + integration.service_hook.destroy! + + subject + + expect(response).to have_gitlab_http_status(:not_found) + end end describe 'POST #retry' do @@ -37,5 +46,14 @@ RSpec.describe Projects::ServiceHookLogsController do expect_any_instance_of(described_class).to receive(:set_hook_execution_notice) expect(subject).to redirect_to(edit_project_service_path(project, integration)) end + + it 'renders a 404 if the hook does not exist' do + log_params + integration.service_hook.destroy! + + subject + + expect(response).to have_gitlab_http_status(:not_found) + end end end |