diff --git a/app/views/case_logs/index.html.erb b/app/views/case_logs/index.html.erb index cce0a67bc..588c1cf6a 100644 --- a/app/views/case_logs/index.html.erb +++ b/app/views/case_logs/index.html.erb @@ -1,9 +1,9 @@ <% item_label = @pagy.count > 1 ? "logs" : "log" %> <% if @searched.present? %> - <% title = "Logs (search results for ‘#{@searched}’#{@pagy.count > 1 ? ", page #{@pagy.from} of #{@pagy.last}" : ''}) - Submit social housing and sales data (CORE) - GOV.UK" %> + <% title = "Logs (search results for ‘#{@searched}’#{@pagy.count > 1 ? ", page #{@pagy.page} of #{@pagy.last}" : ''}) - Submit social housing and sales data (CORE) - GOV.UK" %> <% else %> - <% title = "Logs - #{@pagy.count > 1 ? "(page #{@pagy.from} of #{@pagy.last})" : ''} Submit social housing and sales data (CORE) - GOV.UK" %> + <% title = "Logs #{@pagy.count > 1 ? "(page #{@pagy.page} of #{@pagy.last})" : ''} - Submit social housing and sales data (CORE) - GOV.UK" %> <% end %> <% content_for :title, title %> diff --git a/spec/requests/case_logs_controller_spec.rb b/spec/requests/case_logs_controller_spec.rb index 9d3b88682..e16d7cdf2 100644 --- a/spec/requests/case_logs_controller_spec.rb +++ b/spec/requests/case_logs_controller_spec.rb @@ -490,7 +490,7 @@ RSpec.describe CaseLogsController, type: :request do end it "has pagination in the title" do - expect(page).to have_title("Logs (page 1 of 2)") + expect(page).to have_title("Logs (page 1 of 2) - Submit social housing and sales data (CORE) - GOV.UK") end end @@ -515,7 +515,7 @@ RSpec.describe CaseLogsController, type: :request do end it "has pagination in the title" do - expect(page).to have_title("Logs (page 2 of 2)") + expect(page).to have_title("Logs (page 2 of 2) - Submit social housing and sales data (CORE) - GOV.UK") end end end