Browse Source

Simpler test

pull/454/head
baarkerlounger 3 years ago
parent
commit
0719ae5db0
  1. 8
      spec/requests/case_logs_controller_spec.rb

8
spec/requests/case_logs_controller_spec.rb

@ -169,8 +169,8 @@ RSpec.describe CaseLogsController, type: :request do
it "does have organisation columns" do it "does have organisation columns" do
get "/logs", headers: headers, params: {} get "/logs", headers: headers, params: {}
expect(CGI.unescape_html(response.body)).to match(/<th class="govuk-table__header" scope="col">Owning organisation<\/th>/) expect(page).to have_content("Owning organisation")
expect(CGI.unescape_html(response.body)).to match(/<th class="govuk-table__header" scope="col">Managing organisation<\/th>/) expect(page).to have_content("Managing organisation")
end end
end end
@ -181,8 +181,8 @@ RSpec.describe CaseLogsController, type: :request do
it "does not have organisation columns" do it "does not have organisation columns" do
get "/logs", headers: headers, params: {} get "/logs", headers: headers, params: {}
expect(CGI.unescape_html(response.body)).not_to match(/<th class="govuk-table__header" scope="col">Owning organisation<\/th>/) expect(page).not_to have_content("Owning organisation")
expect(CGI.unescape_html(response.body)).not_to match(/<th class="govuk-table__header" scope="col">Managing organisation<\/th>/) expect(page).not_to have_content("Managing organisation")
end end
context "when there are less than 20 logs" do context "when there are less than 20 logs" do

Loading…
Cancel
Save