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)