From 8e85e890f49a707d7c868716726f93c0d00835a3 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Thu, 12 May 2022 19:09:45 +0100 Subject: [PATCH] Make logs link less ambiguous --- app/views/case_logs/_log_list.html.erb | 4 +++- spec/requests/case_logs_controller_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/case_logs/_log_list.html.erb b/app/views/case_logs/_log_list.html.erb index d2dd66b8c..d2b4e8888 100644 --- a/app/views/case_logs/_log_list.html.erb +++ b/app/views/case_logs/_log_list.html.erb @@ -24,7 +24,9 @@ <% case_logs.map do |log| %> - <%= govuk_link_to log.id, case_log_path(log) %> + <%= govuk_link_to case_log_path(log) do %> + Log <%= log.id %> + <% end %> <%= log.tenant_code? ? log.tenant_code : "–" %> diff --git a/spec/requests/case_logs_controller_spec.rb b/spec/requests/case_logs_controller_spec.rb index 9480f4bcb..9a9dd60e1 100644 --- a/spec/requests/case_logs_controller_spec.rb +++ b/spec/requests/case_logs_controller_spec.rb @@ -309,8 +309,8 @@ RSpec.describe CaseLogsController, type: :request do end it "only shows case logs for your organisation" do - expected_case_row_log = "#{case_log.id}" - unauthorized_case_row_log = "#{unauthorized_case_log.id}" + expected_case_row_log = "Log #{case_log.id}" + unauthorized_case_row_log = "Log #{unauthorized_case_log.id}" expect(CGI.unescape_html(response.body)).to include(expected_case_row_log) expect(CGI.unescape_html(response.body)).not_to include(unauthorized_case_row_log) end