From ecf98c974c23a0d428e9a616e2e38a2504f26cef Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Mon, 10 Jan 2022 12:27:38 +0000 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20require=20JS=20to=20create=20ne?= =?UTF-8?q?w=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/case_logs/index.html.erb | 2 +- spec/features/form/form_navigation_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/case_logs/index.html.erb b/app/views/case_logs/index.html.erb index 56992cd13..2b4e2d815 100644 --- a/app/views/case_logs/index.html.erb +++ b/app/views/case_logs/index.html.erb @@ -6,7 +6,7 @@ <%= content_for(:title) %> - <%= govuk_button_link_to "Create new log", case_logs_path, method: :post %> + <%= govuk_button_to "Create new log", case_logs_path %> <% if @in_progress_case_logs.present? %> <%= render partial: "log_list", locals: { case_logs: @in_progress_case_logs, title: "Logs you need to complete", date_title: "Last Changed" } %> diff --git a/spec/features/form/form_navigation_spec.rb b/spec/features/form/form_navigation_spec.rb index 445ff98e5..daef5f58a 100644 --- a/spec/features/form/form_navigation_spec.rb +++ b/spec/features/form/form_navigation_spec.rb @@ -31,7 +31,7 @@ RSpec.describe "Form Navigation" do describe "Create new log" do it "redirects to the task list for the new log" do visit("/logs") - click_link("Create new log") + click_button("Create new log") id = CaseLog.order(created_at: :desc).first.id expect(page).to have_content("Log #{id}") end