0
0
Fork 0

Remove double no-records cases in api/v1/admin req specs (#32014)

This commit is contained in:
Matt Jankowski 2024-09-23 05:27:53 -04:00 committed by GitHub
parent 66ed7ea4b5
commit 447d0a3e88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 81 additions and 68 deletions

View file

@ -19,19 +19,16 @@ RSpec.describe 'Reports' do
it_behaves_like 'forbidden for wrong scope', 'write:statuses'
it_behaves_like 'forbidden for wrong role', ''
it 'returns http success' do
subject
expect(response).to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
end
context 'when there are no reports' do
it 'returns an empty list' do
subject
expect(response.parsed_body).to be_empty
expect(response)
.to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body)
.to be_empty
end
end
@ -66,7 +63,12 @@ RSpec.describe 'Reports' do
it 'returns all unresolved reports' do
subject
expect(response.parsed_body).to match_array(expected_response)
expect(response)
.to have_http_status(200)
expect(response.content_type)
.to start_with('application/json')
expect(response.parsed_body)
.to match_array(expected_response)
end
context 'with resolved param' do