Make it possible to retrieve both resolved and unresolved reports by api (#38323)

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk authored and GitHub committed 2026-05-23 11:07:02 +00:00
1 parent 6a4d14b178
commit 6b2616453f
3 files changed
+25 -4

No files matched your search

@@ -78,6 +78,17 @@ RSpec.describe 'Reports' do
end
end
context 'with both resolved and unresolved params' do
let(:params) { { resolved: true, unresolved: true } }
let(:scope) { Report.all }
it 'returns all reports' do
subject
expect(response.parsed_body).to match_array(expected_response)
end
end
context 'with account_id param' do
let(:params) { { account_id: reporter.id } }
let(:scope) { Report.unresolved.where(account: reporter) }