Browse Source

testing title on logs

pull/608/head
JG 3 years ago
parent
commit
cab7fc653e
  1. 4
      app/views/case_logs/index.html.erb
  2. 4
      spec/requests/case_logs_controller_spec.rb

4
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 %>

4
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

Loading…
Cancel
Save