0
0
Fork 0

Autofix Rubocop RSpec/ImplicitSubject (#23721)

This commit is contained in:
Nick Schonning 2023-02-19 23:00:48 -05:00 committed by GitHub
parent 63e6353886
commit 38a1d8bb85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 184 additions and 221 deletions

View file

@ -5,7 +5,7 @@ describe Settings::FeaturedTagsController do
shared_examples 'authenticate user' do
it 'redirects to sign_in page' do
is_expected.to redirect_to new_user_session_path
expect(subject).to redirect_to new_user_session_path
end
end

View file

@ -5,7 +5,7 @@ describe Settings::MigrationsController do
shared_examples 'authenticate user' do
it 'redirects to sign_in page' do
is_expected.to redirect_to new_user_session_path
expect(subject).to redirect_to new_user_session_path
end
end
@ -27,8 +27,8 @@ describe Settings::MigrationsController do
let(:moved_to_account) { nil }
it 'renders show page' do
is_expected.to have_http_status 200
is_expected.to render_template :show
expect(subject).to have_http_status 200
expect(subject).to render_template :show
end
end
@ -36,8 +36,8 @@ describe Settings::MigrationsController do
let(:moved_to_account) { Fabricate(:account) }
it 'renders show page' do
is_expected.to have_http_status 200
is_expected.to render_template :show
expect(subject).to have_http_status 200
expect(subject).to render_template :show
end
end
end
@ -61,7 +61,7 @@ describe Settings::MigrationsController do
let(:acct) { Fabricate(:account, also_known_as: [ActivityPub::TagManager.instance.uri_for(user.account)]) }
it 'updates moved to account' do
is_expected.to redirect_to settings_migration_path
expect(subject).to redirect_to settings_migration_path
expect(user.account.reload.moved_to_account_id).to eq acct.id
end
end
@ -70,7 +70,7 @@ describe Settings::MigrationsController do
let(:acct) { user.account }
it 'renders show' do
is_expected.to render_template :show
expect(subject).to render_template :show
end
it 'does not update the moved account' do
@ -82,7 +82,7 @@ describe Settings::MigrationsController do
let(:acct) { Fabricate(:account, also_known_as: []) }
it 'renders show' do
is_expected.to render_template :show
expect(subject).to render_template :show
end
it 'does not update the moved account' do
@ -99,7 +99,7 @@ describe Settings::MigrationsController do
end
it 'renders show' do
is_expected.to render_template :show
expect(subject).to render_template :show
end
it 'does not update the moved account' do

View file

@ -15,7 +15,7 @@ describe Settings::SessionsController do
let(:id) { session_activation.id }
it 'destroys session activation' do
is_expected.to redirect_to edit_user_registration_path
expect(subject).to redirect_to edit_user_registration_path
expect(SessionActivation.find_by(id: id)).to be_nil
end
end
@ -24,7 +24,7 @@ describe Settings::SessionsController do
let(:id) { session_activation.id + 1000 }
it 'destroys session activation' do
is_expected.to have_http_status 404
expect(subject).to have_http_status 404
end
end
end