end
it 'returns http success' do
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
it 'returns http success' do
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
it 'returns http success' do
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
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
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
it 'returns http success' do
get :index
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
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
get :show, params: { account_id: account.id }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
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
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
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
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
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
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
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
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
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
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
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
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
it 'returns http success' do
get :edit
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
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
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
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
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
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
end
it 'returns http success' do
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
'3600',
nil
)
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(202)
end
end
account,
'https://callback.host/api',
)
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(202)
end
end
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
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
end
it 'returns http success' do
- expect(response).to have_http_status(:missing)
+ expect(response).to have_http_status(404)
end
end
end
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
it 'returns http success' do
get :index
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
end
it 'returns http success' do
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
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
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
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
end
it 'returns http success' do
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
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
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
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
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
it 'returns http success' do
get :show
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
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
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
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
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
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
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
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
end
it 'returns http 422' do
- expect(response).to have_http_status(:error)
+ expect(response).to have_http_status(500)
end
end
end
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
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
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
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
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
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
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
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
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
it 'returns http success' do
get :index
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
end
it 'returns http success' do
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
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
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
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
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
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
describe 'GET #card' do
it 'returns http success' do
get :card, params: { id: status.id }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
it 'returns http success' do
get :show
- 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
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
end
it 'returns http success' do
get :show
- 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
it 'returns http success' do
get :show, params: { local: true }
- 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
it 'returns http success' do
get :show
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.headers['Link']).to be_nil
end
end
it 'returns http success' do
get :show, params: { id: 'test' }
- 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
describe 'GET #show' do
it 'returns http success' do
get :show, params: { id: 'test' }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.headers['Link']).to be_nil
end
end
patch :update, format: :json, params: { data: { 'onboarded' => true } }
user.reload
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(user_web_setting.data['onboarded']).to eq('true')
end
routes.draw { get 'success' => 'anonymous#success' }
allow(Rails.env).to receive(:production?).and_return(false)
get 'success'
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
it "forces ssl if Rails.env.production? is 'true'" do
it 'does nothing if not signed in' do
get 'success'
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
it 'does nothing if user who signed in is not suspended' do
sign_in(Fabricate(:user, account: Fabricate(:account, suspended: false)))
get 'success'
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
it 'returns http 403 if user who signed in is suspended' do
it 'returns http success' do
@request.env['devise.mapping'] = Devise.mappings[:user]
get :new
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
it 'returns http success' do
@request.env['devise.mapping'] = Devise.mappings[:user]
get :new
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
context 'with valid reset_password_token' do
it 'returns http success' do
get :edit, params: { reset_password_token: @token }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
request.env["devise.mapping"] = Devise.mappings[:user]
sign_in(Fabricate(:user))
get :edit
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
request.env["devise.mapping"] = Devise.mappings[:user]
sign_in(Fabricate(:user), scope: :user)
post :update
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
it 'returns http success' do
Setting.open_registrations = true
get :new
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
it 'returns http success' do
get :new
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
get :show, params: { acct: 'http://example.com' }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(assigns(:account)).to eq account
end
get :show, params: { acct: 'acct:found@hostname' }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(assigns(:account)).to eq account
end
end
it 'returns http success' do
account = Fabricate(:account)
get 'success', params: { account_username: account.username }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
sign_in user
get :index, format: :csv
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.content_type).to eq 'text/csv'
expect(response.headers['Content-Disposition']).to eq 'attachment; filename="anonymous.csv"'
expect(response.body).to eq user.account.username
expect(assigned[0]).to eq follow1
expect(assigned[1]).to eq follow0
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
expect(assigned[0]).to eq follow1
expect(assigned[1]).to eq follow0
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
end
it 'returns http success' do
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
media_attachment = Fabricate(:media_attachment, status: nil)
get :show, params: { id: media_attachment.to_param }
- expect(response).to have_http_status(:missing)
+ expect(response).to have_http_status(404)
end
it 'raises when shortcode cant be found' do
get :show, params: { id: 'missing' }
- expect(response).to have_http_status(:missing)
+ expect(response).to have_http_status(404)
end
it 'raises when not permitted to view' do
allow_any_instance_of(MediaController).to receive(:authorize).and_raise(ActiveRecord::RecordNotFound)
get :show, params: { id: media_attachment.to_param }
- expect(response).to have_http_status(:missing)
+ expect(response).to have_http_status(404)
end
end
end
it 'returns http success' do
subject
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
it 'gives options to authorize and deny' do
it 'returns http success' do
subject
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
include_examples 'stores location for user'
account = Fabricate(:account)
get :new, params: { account_username: account.to_param }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response).to render_template(:new)
expect(assigns(:remote_follow).acct).to be_nil
end
account = Fabricate(:account)
get :new, params: { account_username: account.to_param }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response).to render_template(:new)
expect(assigns(:remote_follow).acct).to eq 'user@example.com'
end
it 'shows apps' do
get :index
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(assigns(:applications)).to include(app)
expect(assigns(:applications)).to_not include(other_app)
end
describe 'GET #show' do
it 'returns http success' do
get :show, params: { id: app.id }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(assigns[:application]).to eql(app)
end
describe 'GET #new' do
it 'works' do
get :new
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
it 'returns http success' do
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
it 'renders form again' do
end
it 'returns http success' do
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
it 'renders form again' do
it 'renders confirmation page' do
get :show
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
export = assigns(:export)
expect(export).to be_instance_of Export
expect(export.account).to eq user.account
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
it 'returns http success' do
sign_in user, scope: :user
subject
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
include_examples 'authenticate user'
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
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
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
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
expect(assigns(:confirmation)).to be_instance_of Form::TwoFactorConfirmation
expect(assigns(:provision_url)).to eq 'otpauth://totp/local-part@domain?secret=thisisasecretforthespecofnewview&issuer=cb6e6126.ngrok.io'
expect(assigns(:qrcode)).to be_instance_of RQRCode::QRCode
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response).to render_template(:new)
end
end
expect(assigns(:recovery_codes)).to eq otp_backup_codes
expect(flash[:notice]).to eq 'Two-factor authentication successfully enabled'
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response).to render_template('settings/two_factor_authentication/recovery_codes/index')
end
end
expect(assigns(:recovery_codes)).to eq otp_backup_codes
expect(flash[:notice]).to eq 'Recovery codes successfully regenerated'
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response).to render_template(:index)
end
user.update(otp_required_for_login: true)
get :show
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
user.update(otp_required_for_login: false)
get :show
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
end
it 'returns a success' do
status = Fabricate(:status)
get :show, params: { account_username: status.account.username, id: status.id }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
it 'renders stream_entries/show' do
it 'returns http success with Atom' do
status = Fabricate(:status)
get :show, params: { account_username: status.account.username, id: status.stream_entry.id }, format: 'atom'
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
end
context 'when tag exists' do
it 'returns http success' do
get :show, params: { id: 'test', max_id: late.id }
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
end
it 'renders application layout' do
it 'returns http missing for non-existent tag' do
get :show, params: { id: 'none' }
- expect(response).to have_http_status(:missing)
+ expect(response).to have_http_status(404)
end
end
end
it 'returns http success' do
get :show, format: :xml
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.content_type).to eq 'application/xrd+xml'
expect(response.body).to eq <<XML
<?xml version="1.0"?>
json = body_as_json
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.content_type).to eq 'application/jrd+json'
expect(json[:subject]).to eq 'acct:alice@cb6e6126.ngrok.io'
expect(json[:aliases]).to include('https://cb6e6126.ngrok.io/@alice', 'https://cb6e6126.ngrok.io/users/alice')
xml = Nokogiri::XML(response.body)
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.content_type).to eq 'application/xrd+xml'
expect(xml.at_xpath('//xmlns:Subject').content).to eq 'acct:alice@cb6e6126.ngrok.io'
expect(xml.xpath('//xmlns:Alias').map(&:content)).to include('https://cb6e6126.ngrok.io/@alice', 'https://cb6e6126.ngrok.io/users/alice')
json = body_as_json
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.content_type).to eq 'application/jrd+json'
expect(json[:subject]).to eq 'acct:alice@cb6e6126.ngrok.io'
expect(json[:aliases]).to include('https://cb6e6126.ngrok.io/@alice', 'https://cb6e6126.ngrok.io/users/alice')
it "returns an xml response" do
get host_meta_url
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.content_type).to eq "application/xrd+xml"
end
end
it 'returns a json response' do
get webfinger_url(resource: alice.to_webfinger_s)
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.content_type).to eq 'application/jrd+json'
end
end
it 'returns an xml response for xml format' do
get webfinger_url(resource: alice.to_webfinger_s, format: :xml)
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.content_type).to eq 'application/xrd+xml'
end
headers = { 'HTTP_ACCEPT' => 'application/xrd+xml' }
get webfinger_url(resource: alice.to_webfinger_s), headers: headers
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.content_type).to eq 'application/xrd+xml'
end
end
it 'returns a json response for json format' do
get webfinger_url(resource: alice.to_webfinger_s, format: :json)
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.content_type).to eq 'application/jrd+json'
end
headers = { 'HTTP_ACCEPT' => 'application/jrd+json' }
get webfinger_url(resource: alice.to_webfinger_s), headers: headers
- expect(response).to have_http_status(:success)
+ expect(response).to have_http_status(200)
expect(response.content_type).to eq 'application/jrd+json'
end
end