Fix RSpec/HookArgument
cop (#27747)
This commit is contained in:
parent
1b28ab7263
commit
b06284c572
9 changed files with 16 additions and 30 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue