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