From 8b37242a5824b21e0edb1d6f5d431f6fa45efd64 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Thu, 16 Nov 2023 13:51:20 +0100 Subject: [PATCH] RSpec redirect: Fix erroneous test cases for DELETE --- spec/controllers/error_template_attributes_controller_spec.rb | 2 +- spec/controllers/error_templates_controller_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/controllers/error_template_attributes_controller_spec.rb b/spec/controllers/error_template_attributes_controller_spec.rb index 07f59fa4..5be49bcf 100644 --- a/spec/controllers/error_template_attributes_controller_spec.rb +++ b/spec/controllers/error_template_attributes_controller_spec.rb @@ -71,6 +71,6 @@ RSpec.describe ErrorTemplateAttributesController do expect { delete :destroy, params: {id: error_template_attribute} }.to change(ErrorTemplateAttribute, :count).by(-1) end - expect_redirect { error_template_attribute } + expect_redirect(:error_template_attributes) end end diff --git a/spec/controllers/error_templates_controller_spec.rb b/spec/controllers/error_templates_controller_spec.rb index 79de37d4..5c3058e7 100644 --- a/spec/controllers/error_templates_controller_spec.rb +++ b/spec/controllers/error_templates_controller_spec.rb @@ -71,6 +71,6 @@ RSpec.describe ErrorTemplatesController do expect { delete :destroy, params: {id: error_template} }.to change(ErrorTemplate, :count).by(-1) end - expect_redirect { error_template } + expect_redirect(:error_templates) end end