Use raw status code on have_http_status (#7214)

This commit is contained in:
Yamagishi Kazutoshi 2018-04-22 04:35:07 +09:00 committed by Eugen Rochko
parent bfe26ef67b
commit d10447c3a8
87 changed files with 176 additions and 176 deletions

View File

@ -17,7 +17,7 @@ RSpec.describe AboutController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -35,7 +35,7 @@ RSpec.describe AboutController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -49,7 +49,7 @@ RSpec.describe AboutController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end

View File

@ -40,7 +40,7 @@ RSpec.describe AccountsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'returns correct format' do

View File

@ -13,7 +13,7 @@ RSpec.describe ActivityPub::OutboxesController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'returns application/activity+json' do

View File

@ -63,7 +63,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
it 'returns http success' do
get :index
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -72,7 +72,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
it 'returns http success' do
get :show, params: { id: account.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -16,7 +16,7 @@ RSpec.describe Admin::ChangeEmailsController, type: :controller do
get :show, params: { account_id: account.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end

View File

@ -20,14 +20,14 @@ RSpec.describe Admin::ConfirmationsController, type: :controller do
it 'raises an error when there is no account' do
post :create, params: { account_id: 'fake' }
expect(response).to have_http_status(:missing)
expect(response).to have_http_status(404)
end
it 'raises an error when there is no user' do
account = Fabricate(:account, user: nil)
post :create, params: { account_id: account.id }
expect(response).to have_http_status(:missing)
expect(response).to have_http_status(404)
end
end
end

View File

@ -23,7 +23,7 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
assigned = assigns(:domain_blocks)
expect(assigned.count).to eq 1
expect(assigned.klass).to be DomainBlock
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -32,7 +32,7 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
get :new
expect(assigns(:domain_block)).to be_instance_of(DomainBlock)
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -41,7 +41,7 @@ RSpec.describe Admin::DomainBlocksController, type: :controller do
domain_block = Fabricate(:domain_block)
get :show, params: { id: domain_block.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end

View File

@ -25,7 +25,7 @@ RSpec.describe Admin::EmailDomainBlocksController, type: :controller do
assigned = assigns(:email_domain_blocks)
expect(assigned.count).to eq 1
expect(assigned.klass).to be EmailDomainBlock
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -34,7 +34,7 @@ RSpec.describe Admin::EmailDomainBlocksController, type: :controller do
get :new
expect(assigns(:email_domain_block)).to be_instance_of(EmailDomainBlock)
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end

View File

@ -26,7 +26,7 @@ RSpec.describe Admin::InstancesController, type: :controller do
expect(instances.size).to eq 1
expect(instances[0].domain).to eq 'less.popular'
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -84,7 +84,7 @@ describe Admin::ReportedStatusesController do
allow(RemovalWorker).to receive(:perform_async)
delete :destroy, params: { report_id: report, id: status }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
expect(RemovalWorker).
to have_received(:perform_async).with(status.id)
end

View File

@ -18,7 +18,7 @@ describe Admin::ReportsController do
reports = assigns(:reports).to_a
expect(reports.size).to eq 1
expect(reports[0]).to eq specified
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'returns http success with resolved filter' do
@ -31,7 +31,7 @@ describe Admin::ReportsController do
expect(reports.size).to eq 1
expect(reports[0]).to eq specified
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -42,7 +42,7 @@ describe Admin::ReportsController do
get :show, params: { id: report }
expect(assigns(:report)).to eq report
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -52,7 +52,7 @@ describe Admin::ReportsController do
report = Fabricate(:report)
put :update, params: { id: report, outcome: 'unknown' }
expect(response).to have_http_status(:missing)
expect(response).to have_http_status(404)
end
end

View File

@ -14,7 +14,7 @@ RSpec.describe Admin::SettingsController, type: :controller do
it 'returns http success' do
get :edit
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end

View File

@ -20,7 +20,7 @@ describe Admin::StatusesController do
statuses = assigns(:statuses).to_a
expect(statuses.size).to eq 2
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'returns http success with media' do
@ -28,7 +28,7 @@ describe Admin::StatusesController do
statuses = assigns(:statuses).to_a
expect(statuses.size).to eq 1
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -99,7 +99,7 @@ describe Admin::StatusesController do
allow(RemovalWorker).to receive(:perform_async)
delete :destroy, params: { account_id: account.id, id: status }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
expect(RemovalWorker).
to have_received(:perform_async).with(status.id)
end

View File

@ -26,7 +26,7 @@ RSpec.describe Admin::SubscriptionsController, type: :controller do
expect(subscriptions.count).to eq 1
expect(subscriptions[0]).to eq specified
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -23,7 +23,7 @@ describe Api::BaseController do
it 'does not protect from forgery' do
ActionController::Base.allow_forgery_protection = true
post 'success'
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end

View File

@ -13,7 +13,7 @@ RSpec.describe Api::OEmbedController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -23,7 +23,7 @@ RSpec.describe Api::PushController, type: :controller do
'3600',
nil
)
expect(response).to have_http_status(:success)
expect(response).to have_http_status(202)
end
end
@ -43,7 +43,7 @@ RSpec.describe Api::PushController, type: :controller do
account,
'https://callback.host/api',
)
expect(response).to have_http_status(:success)
expect(response).to have_http_status(202)
end
end

View File

@ -24,7 +24,7 @@ RSpec.describe Api::SalmonController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(202)
end
it 'creates remote account' do

View File

@ -12,7 +12,7 @@ RSpec.describe Api::SubscriptionsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'echoes back the challenge' do
@ -27,7 +27,7 @@ RSpec.describe Api::SubscriptionsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:missing)
expect(response).to have_http_status(404)
end
end
end
@ -59,7 +59,7 @@ RSpec.describe Api::SubscriptionsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'creates statuses for feed' do

View File

@ -14,7 +14,7 @@ describe Api::V1::Accounts::CredentialsController do
describe 'GET #show' do
it 'returns http success' do
get :show
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -36,7 +36,7 @@ describe Api::V1::Accounts::CredentialsController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'updates account info' do

View File

@ -15,7 +15,7 @@ describe Api::V1::Accounts::FollowerAccountsController do
it 'returns http success' do
get :index, params: { account_id: user.account.id, limit: 1 }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -15,7 +15,7 @@ describe Api::V1::Accounts::FollowingAccountsController do
it 'returns http success' do
get :index, params: { account_id: user.account.id, limit: 1 }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -17,7 +17,7 @@ describe Api::V1::Accounts::ListsController do
describe 'GET #index' do
it 'returns http success' do
get :index, params: { account_id: account.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -25,7 +25,7 @@ describe Api::V1::Accounts::RelationshipsController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'returns JSON with correct data' do
@ -43,7 +43,7 @@ describe Api::V1::Accounts::RelationshipsController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'returns JSON with correct data' do

View File

@ -14,7 +14,7 @@ RSpec.describe Api::V1::Accounts::SearchController, type: :controller do
it 'returns http success' do
get :show, params: { q: 'query' }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -15,7 +15,7 @@ describe Api::V1::Accounts::StatusesController do
it 'returns http success' do
get :index, params: { account_id: user.account.id, limit: 1 }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
expect(response.headers['Link'].links.size).to eq(2)
end
@ -23,7 +23,7 @@ describe Api::V1::Accounts::StatusesController do
it 'returns http success' do
get :index, params: { account_id: user.account.id, only_media: true }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -35,7 +35,7 @@ describe Api::V1::Accounts::StatusesController do
it 'returns http success' do
get :index, params: { account_id: user.account.id, exclude_replies: true }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -47,7 +47,7 @@ describe Api::V1::Accounts::StatusesController do
it 'returns http success' do
get :index, params: { account_id: user.account.id, pinned: true }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -13,7 +13,7 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
describe 'GET #show' do
it 'returns http success' do
get :show, params: { id: user.account.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -28,7 +28,7 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
let(:locked) { false }
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'returns JSON with following=true and requested=false' do
@ -47,7 +47,7 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
let(:locked) { true }
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'returns JSON with following=false and requested=true' do
@ -72,7 +72,7 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'removes the following relation between user and target user' do
@ -89,7 +89,7 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'removes the following relation between user and target user' do
@ -110,7 +110,7 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'removes the blocking relation between user and target user' do
@ -127,7 +127,7 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'does not remove the following relation between user and target user' do
@ -152,7 +152,7 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'does not remove the following relation between user and target user' do
@ -177,7 +177,7 @@ RSpec.describe Api::V1::AccountsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'removes the muting relation between user and target user' do

View File

@ -16,7 +16,7 @@ describe Api::V1::Apps::CredentialsController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'does not contain client credentials' do

View File

@ -9,7 +9,7 @@ RSpec.describe Api::V1::AppsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'creates an OAuth app' do

View File

@ -47,7 +47,7 @@ RSpec.describe Api::V1::BlocksController, type: :controller do
it 'returns http success' do
get :index
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -12,7 +12,7 @@ RSpec.describe Api::V1::CustomEmojisController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -17,7 +17,7 @@ RSpec.describe Api::V1::DomainBlocksController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'returns blocked domains' do
@ -31,7 +31,7 @@ RSpec.describe Api::V1::DomainBlocksController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'creates a domain block' do
@ -45,7 +45,7 @@ RSpec.describe Api::V1::DomainBlocksController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'deletes a domain block' do

View File

@ -18,7 +18,7 @@ RSpec.describe Api::V1::FollowRequestsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -28,7 +28,7 @@ RSpec.describe Api::V1::FollowRequestsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'allows follower to follow' do
@ -42,7 +42,7 @@ RSpec.describe Api::V1::FollowRequestsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'removes follow request' do

View File

@ -24,7 +24,7 @@ RSpec.describe Api::V1::FollowsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'creates account for remote user' do
@ -45,7 +45,7 @@ RSpec.describe Api::V1::FollowsController, type: :controller do
it 'returns http success if already following, too' do
post :create, params: { uri: 'gargron@quitter.no' }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -16,7 +16,7 @@ RSpec.describe Api::V1::InstancesController, type: :controller do
it 'returns http success' do
get :show
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -17,7 +17,7 @@ describe Api::V1::Lists::AccountsController do
it 'returns http success' do
get :show, params: { list_id: list.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -30,7 +30,7 @@ describe Api::V1::Lists::AccountsController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'adds account to the list' do
@ -44,7 +44,7 @@ describe Api::V1::Lists::AccountsController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'removes account from the list' do

View File

@ -12,14 +12,14 @@ RSpec.describe Api::V1::ListsController, type: :controller do
describe 'GET #index' do
it 'returns http success' do
get :index
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
describe 'GET #show' do
it 'returns http success' do
get :show, params: { id: list.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -29,7 +29,7 @@ RSpec.describe Api::V1::ListsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'creates list' do
@ -44,7 +44,7 @@ RSpec.describe Api::V1::ListsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'updates the list' do
@ -58,7 +58,7 @@ RSpec.describe Api::V1::ListsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'deletes the list' do

View File

@ -30,7 +30,7 @@ RSpec.describe Api::V1::MediaController, type: :controller do
end
it 'returns http 422' do
expect(response).to have_http_status(:error)
expect(response).to have_http_status(500)
end
end
end
@ -41,7 +41,7 @@ RSpec.describe Api::V1::MediaController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'creates a media attachment' do
@ -63,7 +63,7 @@ RSpec.describe Api::V1::MediaController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'creates a media attachment' do
@ -85,7 +85,7 @@ RSpec.describe Api::V1::MediaController, type: :controller do
end
xit 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
xit 'creates a media attachment' do

View File

@ -15,7 +15,7 @@ RSpec.describe Api::V1::MutesController, type: :controller do
it 'returns http success' do
get :index, params: { limit: 1 }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -16,7 +16,7 @@ RSpec.describe Api::V1::NotificationsController, type: :controller do
notification = Fabricate(:notification, account: user.account)
get :show, params: { id: notification.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -25,7 +25,7 @@ RSpec.describe Api::V1::NotificationsController, type: :controller do
notification = Fabricate(:notification, account: user.account)
post :dismiss, params: { id: notification.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
expect { notification.reload }.to raise_error(ActiveRecord::RecordNotFound)
end
end
@ -36,7 +36,7 @@ RSpec.describe Api::V1::NotificationsController, type: :controller do
post :clear
expect(notification.account.reload.notifications).to be_empty
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -56,7 +56,7 @@ RSpec.describe Api::V1::NotificationsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'includes reblog' do
@ -82,7 +82,7 @@ RSpec.describe Api::V1::NotificationsController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'includes reblog' do

View File

@ -16,7 +16,7 @@ RSpec.describe Api::V1::ReportsController, type: :controller do
it 'returns http success' do
get :index
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -31,7 +31,7 @@ RSpec.describe Api::V1::ReportsController, type: :controller do
it 'creates a report' do
expect(status.reload.account.targeted_reports).not_to be_empty
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'sends e-mails to admins' do

View File

@ -16,7 +16,7 @@ RSpec.describe Api::V1::SearchController, type: :controller do
it 'returns http success' do
get :index, params: { q: 'test' }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -21,7 +21,7 @@ RSpec.describe Api::V1::Statuses::FavouritedByAccountsController, type: :control
it 'returns http success' do
get :index, params: { status_id: status.id, limit: 1 }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
expect(response.headers['Link'].links.size).to eq(2)
end
end
@ -43,7 +43,7 @@ RSpec.describe Api::V1::Statuses::FavouritedByAccountsController, type: :control
it 'returns http unautharized' do
get :index, params: { status_id: status.id }
expect(response).to have_http_status(:missing)
expect(response).to have_http_status(404)
end
end
end
@ -58,7 +58,7 @@ RSpec.describe Api::V1::Statuses::FavouritedByAccountsController, type: :control
it 'returns http success' do
get :index, params: { status_id: status.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -22,7 +22,7 @@ describe Api::V1::Statuses::FavouritesController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'updates the favourites count' do
@ -51,7 +51,7 @@ describe Api::V1::Statuses::FavouritesController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'updates the favourites count' do

View File

@ -22,7 +22,7 @@ describe Api::V1::Statuses::MutesController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'creates a conversation mute' do
@ -39,7 +39,7 @@ describe Api::V1::Statuses::MutesController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'destroys the conversation mute' do

View File

@ -22,7 +22,7 @@ describe Api::V1::Statuses::PinsController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'updates the pinned attribute' do
@ -46,7 +46,7 @@ describe Api::V1::Statuses::PinsController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'updates the pinned attribute' do

View File

@ -21,7 +21,7 @@ RSpec.describe Api::V1::Statuses::RebloggedByAccountsController, type: :controll
it 'returns http success' do
get :index, params: { status_id: status.id, limit: 1 }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
expect(response.headers['Link'].links.size).to eq(2)
end
end
@ -42,7 +42,7 @@ RSpec.describe Api::V1::Statuses::RebloggedByAccountsController, type: :controll
it 'returns http unautharized' do
get :index, params: { status_id: status.id }
expect(response).to have_http_status(:missing)
expect(response).to have_http_status(404)
end
end
end
@ -57,7 +57,7 @@ RSpec.describe Api::V1::Statuses::RebloggedByAccountsController, type: :controll
it 'returns http success' do
get :index, params: { status_id: status.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
end

View File

@ -22,7 +22,7 @@ describe Api::V1::Statuses::ReblogsController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'updates the reblogs count' do
@ -51,7 +51,7 @@ describe Api::V1::Statuses::ReblogsController do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'updates the reblogs count' do

View File

@ -17,7 +17,7 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
it 'returns http success' do
get :show, params: { id: status.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -30,7 +30,7 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
it 'returns http success' do
get :context, params: { id: status.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -40,7 +40,7 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -52,7 +52,7 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
end
it 'returns http success' do
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
it 'removes the status' do
@ -72,7 +72,7 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
describe 'GET #show' do
it 'returns http unautharized' do
get :show, params: { id: status.id }
expect(response).to have_http_status(:missing)
expect(response).to have_http_status(404)
end
end
@ -83,14 +83,14 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
it 'returns http unautharized' do
get :context, params: { id: status.id }
expect(response).to have_http_status(:missing)
expect(response).to have_http_status(404)
end
end
describe 'GET #card' do
it 'returns http unautharized' do
get :card, params: { id: status.id }
expect(response).to have_http_status(:missing)
expect(response).to have_http_status(404)
end
end
end
@ -101,7 +101,7 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
describe 'GET #show' do
it 'returns http success' do
get :show, params: { id: status.id }
expect(response).to have_http_status(:success)
expect(response).to have_http_status(200)
end
end
@ -112,14 +112,14 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
it 'returns http success' do