Browse Source

final lint

pull/608/head
JG 3 years ago
parent
commit
0689b141ca
  1. 4
      spec/features/log_spec.rb
  2. 5
      spec/models/case_log_spec.rb

4
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)

5
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)

Loading…
Cancel
Save