Remove double no-records cases in api/v1/admin
req specs (#32014)
This commit is contained in:
parent
66ed7ea4b5
commit
447d0a3e88
7 changed files with 81 additions and 68 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue