From e96fb4be3990989dfb179104b178fe2ec442cf84 Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 10 Jul 2023 10:27:02 +0100 Subject: [PATCH] Add buttons to delete duplicates --- app/views/duplicate_logs/show.erb | 1 + spec/requests/duplicate_logs_controller_spec.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/app/views/duplicate_logs/show.erb b/app/views/duplicate_logs/show.erb index 64817f99c..b97ce0133 100644 --- a/app/views/duplicate_logs/show.erb +++ b/app/views/duplicate_logs/show.erb @@ -11,6 +11,7 @@ <% @all_duplicates.each do |log| %> <%= render partial: "duplicate_log", locals: { log: log } %> <%= render partial: "duplicate_log_check_answers", locals: { log: log } %> + <%= govuk_button_link_to "Keep this log and delete duplicates", "#" %> <% end %> diff --git a/spec/requests/duplicate_logs_controller_spec.rb b/spec/requests/duplicate_logs_controller_spec.rb index 30dde4c45..43b216a08 100644 --- a/spec/requests/duplicate_logs_controller_spec.rb +++ b/spec/requests/duplicate_logs_controller_spec.rb @@ -43,6 +43,10 @@ RSpec.describe DuplicateLogsController, type: :request do expect(page).to have_content("Household rent and charges", count: 3) expect(page).to have_link("Change", count: 21) end + + it "displays buttons to delete duplicates" do + expect(page).to have_link("Keep this log and delete duplicates", count: 3) + end end end end