expect(page).tohave_content("Logs (search results for ‘#{log_to_search.id}’) - Submit social housing and sales data (CORE) - GOV.UK")
expect(page).tohave_title("Your organisation (1 log matching ‘#{log_to_search.id}’ of #{log_total_count} total logs) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it"shows case logs matching the id"do
@ -374,16 +375,18 @@ RSpec.describe CaseLogsController, type: :request do
end
context"when there are more than 1 page of search results"do
expect(page).tohave_content("Logs (search results for ‘#{logs[0].postcode_full}’, page 1 of 2) - Submit social housing and sales data (CORE) - GOV.UK")
expect(page).tohave_title("Your organisation (#{logs.count} logs matching ‘#{postcode}’ of #{log_total_count} total logs) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it"has title with pagination details for page 2"do
expect(page).tohave_content("Logs (search results for ‘#{logs[0].postcode_full}’, page 2 of 2) - Submit social housing and sales data (CORE) - GOV.UK")
expect(page).tohave_title("Your organisation (#{logs.count} logs matching ‘#{postcode}’ of #{log_total_count} total logs) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
@ -539,7 +542,7 @@ RSpec.describe CaseLogsController, type: :request do
end
it"has pagination in the title"do
expect(page).tohave_title("Logs (page 1 of 2) - Submit social housing and sales data (CORE) - GOV.UK")
expect(page).tohave_title("Your organisation (Logs) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
end
@ -564,7 +567,7 @@ RSpec.describe CaseLogsController, type: :request do
end
it"has pagination in the title"do
expect(page).tohave_title("Logs (page 2 of 2) - Submit social housing and sales data (CORE) - GOV.UK")
expect(page).tohave_title("Your organisation (Logs) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_content("Your organisation (#{logs.count} logs matching ‘#{postcode}’ of #{log_total_count} total logs) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("Your organisation (#{logs.count} logs matching ‘#{postcode}’ of #{log_total_count} total logs) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
end
it"has title with pagination details for page 2"do
expect(page).tohave_content("Your organisation (#{logs.count} logs matching ‘#{postcode}’ of #{log_total_count} total logs) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")
expect(page).tohave_title("Your organisation (#{logs.count} logs matching ‘#{postcode}’ of #{log_total_count} total logs) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK")