From e9d3b3d16630c58de35ce04d0cc3726f79a49093 Mon Sep 17 00:00:00 2001 From: Ted Date: Tue, 28 Jun 2022 15:02:18 +0100 Subject: [PATCH] Changed logic to check last page visited was check answers --- app/views/form/page.html.erb | 1 - spec/features/form/form_navigation_spec.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/form/page.html.erb b/app/views/form/page.html.erb index d483a7093..006bde6d2 100644 --- a/app/views/form/page.html.erb +++ b/app/views/form/page.html.erb @@ -5,7 +5,6 @@ <% end %>
- <%= form_with model: @case_log, url: form_case_log_path(@case_log), method: "post", local: true do |f| %>
"> diff --git a/spec/features/form/form_navigation_spec.rb b/spec/features/form/form_navigation_spec.rb index 1f7792075..701007623 100644 --- a/spec/features/form/form_navigation_spec.rb +++ b/spec/features/form/form_navigation_spec.rb @@ -62,7 +62,7 @@ RSpec.describe "Form Navigation" do end it "a question page has a link allowing you to cancel your input and return to the check answers page" do - visit("logs/#{id}/tenant-code-test") + visit("logs/#{id}/tenant-code-test?referrer=check_answers") click_link(text: "Cancel") expect(page).to have_current_path("/logs/#{id}/setup/check-answers") end