DB speedup in API:: controller/request specs (#25516)
This commit is contained in:
@@ -14,15 +14,10 @@ describe Api::V1::Accounts::StatusesController do
|
||||
end
|
||||
|
||||
describe 'GET #index' do
|
||||
it 'returns http success' do
|
||||
it 'returns expected headers', :aggregate_failures do
|
||||
get :index, params: { account_id: user.account.id, limit: 1 }
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
end
|
||||
|
||||
it 'returns expected headers' do
|
||||
get :index, params: { account_id: user.account.id, limit: 1 }
|
||||
|
||||
expect(response.headers['Link'].links.size).to eq(2)
|
||||
end
|
||||
|
||||
@@ -44,14 +39,11 @@ describe Api::V1::Accounts::StatusesController do
|
||||
get :index, params: { account_id: user.account.id, exclude_replies: true }
|
||||
end
|
||||
|
||||
it 'returns http success' do
|
||||
expect(response).to have_http_status(200)
|
||||
end
|
||||
|
||||
it 'returns posts along with self replies' do
|
||||
it 'returns posts along with self replies', :aggregate_failures do
|
||||
json = body_as_json
|
||||
post_ids = json.map { |item| item[:id].to_i }.sort
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
expect(post_ids).to eq [status.id, status_self_reply.id]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user