diff --git a/spec/requests/case_logs_controller_spec.rb b/spec/requests/case_logs_controller_spec.rb
index 788ec70a3..857e0f1b2 100644
--- a/spec/requests/case_logs_controller_spec.rb
+++ b/spec/requests/case_logs_controller_spec.rb
@@ -274,9 +274,7 @@ RSpec.describe CaseLogsController, type: :request do
context "when there are more than 20 logs" do
before do
- 25.times do
- FactoryBot.create(:case_log, owning_organisation: organisation, managing_organisation: organisation,)
- end
+ FactoryBot.create_list(:case_log, 25, owning_organisation: organisation, managing_organisation: organisation)
get "/logs", headers: headers, params: {}
end
@@ -289,7 +287,7 @@ RSpec.describe CaseLogsController, type: :request do
end
it "shows which logs are being shown on the current page" do
- expect(CGI.unescape_html(response.body)).to match("Showing 1 to 20 logs")
+ expect(CGI.unescape_html(response.body)).to match("Showing 1 to 20 of 26 logs")
end
end
@@ -310,7 +308,7 @@ RSpec.describe CaseLogsController, type: :request do
end
it "shows which logs are being shown on the current page" do
- expect(CGI.unescape_html(response.body)).to match("Showing 21 to 26 logs")
+ expect(CGI.unescape_html(response.body)).to match("Showing 21 to 26 of 26 logs")
end
end
end