|
|
|
@ -760,13 +760,13 @@ RSpec.describe CaseLogsController, type: :request do
|
|
|
|
|
expect(csv.count).to eq(2) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "both filter and search applied" do |
|
|
|
|
context "when both filter and search applied" do |
|
|
|
|
let!(:case_log) do |
|
|
|
|
FactoryBot.create( |
|
|
|
|
:case_log, |
|
|
|
|
:completed, |
|
|
|
|
postcode_full: "XX1 1TG", |
|
|
|
|
owning_organisation: organisation |
|
|
|
|
owning_organisation: organisation, |
|
|
|
|
) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
@ -774,9 +774,9 @@ RSpec.describe CaseLogsController, type: :request do
|
|
|
|
|
FactoryBot.create(:case_log, |
|
|
|
|
:in_progress, |
|
|
|
|
postcode_full: case_log.postcode_full, |
|
|
|
|
owning_organisation: organisation |
|
|
|
|
) |
|
|
|
|
owning_organisation: organisation) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "dowloads logs matching both csv and filter logs" do |
|
|
|
|
get "/logs?status[]=completed&search=#{case_log.postcode_full}", headers:, params: {} |
|
|
|
|
csv = CSV.parse(response.body) |
|
|
|
|