Browse Source

failing test getting searched logs

pull/608/head
JG 3 years ago
parent
commit
7db9dae287
  1. 10
      spec/requests/case_logs_controller_spec.rb

10
spec/requests/case_logs_controller_spec.rb

@ -184,6 +184,16 @@ RSpec.describe CaseLogsController, type: :request do
expect(page).to have_content("UA984")
end
context "with a search bar" do
let!(:logs) { FactoryBot.create_list(:case_log, 5) }
it "shows case logs mathing the search word" do
get "/logs?search-field=#{logs.first.id}", headers: headers, params: {}
expect(page).to have_content(logs.first.id)
expect(page).not_to have_content(logs.last.id)
end
end
context "when filtering" do
context "with status filter" do
let(:organisation_2) { FactoryBot.create(:organisation) }

Loading…
Cancel
Save