|
|
|
@ -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) } |
|
|
|
|