From 0719ae5db0542fa66d23276f33427032174cf941 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Thu, 7 Apr 2022 11:18:19 +0100 Subject: [PATCH] Simpler test --- spec/requests/case_logs_controller_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/requests/case_logs_controller_spec.rb b/spec/requests/case_logs_controller_spec.rb index bbc97a5c6..0526ee7ed 100644 --- a/spec/requests/case_logs_controller_spec.rb +++ b/spec/requests/case_logs_controller_spec.rb @@ -169,8 +169,8 @@ RSpec.describe CaseLogsController, type: :request do it "does have organisation columns" do get "/logs", headers: headers, params: {} - expect(CGI.unescape_html(response.body)).to match(/Owning organisation<\/th>/) - expect(CGI.unescape_html(response.body)).to match(/Managing organisation<\/th>/) + expect(page).to have_content("Owning organisation") + expect(page).to have_content("Managing organisation") end end @@ -181,8 +181,8 @@ RSpec.describe CaseLogsController, type: :request do it "does not have organisation columns" do get "/logs", headers: headers, params: {} - expect(CGI.unescape_html(response.body)).not_to match(/Owning organisation<\/th>/) - expect(CGI.unescape_html(response.body)).not_to match(/Managing organisation<\/th>/) + expect(page).not_to have_content("Owning organisation") + expect(page).not_to have_content("Managing organisation") end context "when there are less than 20 logs" do