Browse Source

More logs context

pull/440/head
baarkerlounger 3 years ago
parent
commit
0fbe748eef
  1. 17
      spec/requests/case_logs_controller_spec.rb

17
spec/requests/case_logs_controller_spec.rb

@ -267,6 +267,23 @@ RSpec.describe CaseLogsController, type: :request do
it "shows the log's status" do it "shows the log's status" do
expect(CGI.unescape_html(response.body)).to include(case_log.status.humanize) expect(CGI.unescape_html(response.body)).to include(case_log.status.humanize)
end end
it "shows the total log count" do
expect(CGI.unescape_html(response.body)).to match("<strong>1</strong> total logs")
end
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
get "/logs", headers: headers, params: {}
end
it "shows the total log count" do
expect(CGI.unescape_html(response.body)).to match("<strong>26</strong> total logs")
end
end
end end
context "when requesting a specific case log" do context "when requesting a specific case log" do

Loading…
Cancel
Save