diff --git a/app/controllers/account/contact_for_research_controller.rb b/app/controllers/account/contact_for_research_controller.rb index 08baa2af9..7ca706bb4 100644 --- a/app/controllers/account/contact_for_research_controller.rb +++ b/app/controllers/account/contact_for_research_controller.rb @@ -14,7 +14,7 @@ def update if @contact_for_research_input.submit redirect_to next_path else - render :edit, status: :unprocessable_entity + render :edit, status: :unprocessable_content end end diff --git a/spec/components/page_list_component/view_spec.rb b/spec/components/page_list_component/view_spec.rb index c82407519..2d0be7eba 100644 --- a/spec/components/page_list_component/view_spec.rb +++ b/spec/components/page_list_component/view_spec.rb @@ -196,7 +196,7 @@ end it "renders the route summary list key as a singular route" do - expect(page).to have_css("dt.govuk-summary-list__key", text: /Question #{first_page.position}’s route$/, exact: true) + expect(page).to have_css("dt.govuk-summary-list__key", text: /Question #{first_page.position}’s route$/) end it "renders the condition description" do @@ -221,7 +221,7 @@ end it "renders the route summary list key as plural routes" do - expect(page).to have_css("dt.govuk-summary-list__key", text: /Question #{first_page.position}’s routes$/, exact: true) + expect(page).to have_css("dt.govuk-summary-list__key", text: /Question #{first_page.position}’s routes$/) end it "renders the condition description" do diff --git a/spec/controllers/forms/copy_of_answers_controller_spec.rb b/spec/controllers/forms/copy_of_answers_controller_spec.rb index 6dcb62413..eaddc7b9a 100644 --- a/spec/controllers/forms/copy_of_answers_controller_spec.rb +++ b/spec/controllers/forms/copy_of_answers_controller_spec.rb @@ -94,9 +94,9 @@ context "when the send_copy_of_answers value is invalid" do let(:send_copy_of_answers) { "invalid_value" } - it "renders the new template with unprocessable entity status" do + it "renders the new template with unprocessable content status" do post(copy_of_answers_create_path(form_id: form.id), params:) - expect(response).to have_http_status(:unprocessable_entity) + expect(response).to have_http_status(:unprocessable_content) expect(response).to have_rendered :new expect(response.body).to include("Sorry, there was a problem. Please try again.") end diff --git a/spec/controller/web_controller_spec.rb b/spec/controllers/web_controller_spec.rb similarity index 100% rename from spec/controller/web_controller_spec.rb rename to spec/controllers/web_controller_spec.rb