|
|
|
@ -9,13 +9,13 @@ describe '/api/v1/statuses' do
|
|
|
|
|
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, application: client_app, scopes: scopes) }
|
|
|
|
|
let(:headers) { { 'Authorization' => "Bearer #{token.token}" } }
|
|
|
|
|
|
|
|
|
|
describe 'GET /api/v1/statuses?ids[]=:id' do
|
|
|
|
|
describe 'GET /api/v1/statuses?id[]=:id' do
|
|
|
|
|
let(:status) { Fabricate(:status) }
|
|
|
|
|
let(:other_status) { Fabricate(:status) }
|
|
|
|
|
let(:scopes) { 'read:statuses' }
|
|
|
|
|
|
|
|
|
|
it 'returns expected response' do
|
|
|
|
|
get '/api/v1/statuses', headers: headers, params: { ids: [status.id, other_status.id, 123_123] }
|
|
|
|
|
get '/api/v1/statuses', headers: headers, params: { id: [status.id, other_status.id, 123_123] }
|
|
|
|
|
|
|
|
|
|
expect(response).to have_http_status(200)
|
|
|
|
|
expect(body_as_json).to contain_exactly(
|
|
|
|
|