From 0689b141ca57cd349e2c7c4bdcbb53de2bb8bd41 Mon Sep 17 00:00:00 2001 From: JG Date: Fri, 27 May 2022 07:57:35 +0100 Subject: [PATCH] final lint --- spec/features/log_spec.rb | 4 ++-- spec/models/case_log_spec.rb | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/spec/features/log_spec.rb b/spec/features/log_spec.rb index 41f233442..98aebb3ef 100644 --- a/spec/features/log_spec.rb +++ b/spec/features/log_spec.rb @@ -15,7 +15,7 @@ RSpec.describe "Log Features" do click_button("Sign in") end - it "it displays the logs belonging to the same organisation" do + it "displays the logs belonging to the same organisation" do expect(page).to have_content(log_to_search.id) expect(page).to have_content(same_organisation_log.id) expect(page).not_to have_content(another_organisation_log.id) @@ -45,7 +45,7 @@ RSpec.describe "Log Features" do expect(page).to have_link("Clear search") end - it "it displays the logs belonging to the same organisation after I clear the search results" do + it "displays the logs belonging to the same organisation after I clear the search result after I clear the search resultss" do click_link("Clear search") expect(page).to have_content(log_to_search.id) expect(page).to have_content(same_organisation_log.id) diff --git a/spec/models/case_log_spec.rb b/spec/models/case_log_spec.rb index 1fa83c615..3761725c6 100644 --- a/spec/models/case_log_spec.rb +++ b/spec/models/case_log_spec.rb @@ -1872,9 +1872,12 @@ RSpec.describe CaseLog do end context "when searching logs" do - let!(:case_logs) { FactoryBot.create_list(:case_log, 5, :completed) } let!(:case_log_to_search) { FactoryBot.create(:case_log, :completed) } + before do + FactoryBot.create_list(:case_log, 5, :completed) + end + describe "#filter_by_id" do it "allows searching by a log ID" do result = described_class.filter_by_id(case_log_to_search.id.to_s)