0
0
Fork 0

Fix RSpec/HookArgument cop (#27747)

This commit is contained in:
Matt Jankowski 2023-11-07 04:10:36 -05:00 committed by GitHub
parent 1b28ab7263
commit b06284c572
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 16 additions and 30 deletions

View file

@ -102,7 +102,7 @@ RSpec.describe User do
end
describe 'blacklist' do
around(:each) do |example|
around do |example|
old_blacklist = Rails.configuration.x.email_blacklist
Rails.configuration.x.email_domains_blacklist = 'mvrht.com'
@ -169,7 +169,7 @@ RSpec.describe User do
let(:user) { Fabricate(:user, confirmed_at: nil, unconfirmed_email: new_email) }
context 'when the user is already approved' do
around(:example) do |example|
around do |example|
registrations_mode = Setting.registrations_mode
Setting.registrations_mode = 'approved'
@ -193,7 +193,7 @@ RSpec.describe User do
end
context 'when the user does not require explicit approval' do
around(:example) do |example|
around do |example|
registrations_mode = Setting.registrations_mode
Setting.registrations_mode = 'open'
@ -213,7 +213,7 @@ RSpec.describe User do
end
context 'when the user requires explicit approval but is not approved' do
around(:example) do |example|
around do |example|
registrations_mode = Setting.registrations_mode
Setting.registrations_mode = 'approved'
@ -237,7 +237,7 @@ RSpec.describe User do
describe '#approve!' do
subject { user.approve! }
around(:example) do |example|
around do |example|
registrations_mode = Setting.registrations_mode
Setting.registrations_mode = 'approved'
@ -338,7 +338,7 @@ RSpec.describe User do
end
describe 'whitelist' do
around(:each) do |example|
around do |example|
old_whitelist = Rails.configuration.x.email_domains_whitelist
Rails.configuration.x.email_domains_whitelist = 'mastodon.space'