Update rubocop and rubocop-rspec (#26329)
This commit is contained in:
parent
fe31571965
commit
b970ed6098
15 changed files with 48 additions and 74 deletions
|
@ -25,8 +25,7 @@ RSpec.describe HomeHelper do
|
|||
|
||||
it 'returns a link to the account' do
|
||||
without_partial_double_verification do
|
||||
allow(helper).to receive(:current_account).and_return(account)
|
||||
allow(helper).to receive(:prefers_autoplay?).and_return(false)
|
||||
allow(helper).to receive_messages(current_account: account, prefers_autoplay?: false)
|
||||
result = helper.account_link_to(account)
|
||||
|
||||
expect(result).to match "@#{account.acct}"
|
||||
|
@ -101,8 +100,7 @@ RSpec.describe HomeHelper do
|
|||
|
||||
context 'with open registrations' do
|
||||
it 'returns correct sign up message' do
|
||||
allow(helper).to receive(:closed_registrations?).and_return(false)
|
||||
allow(helper).to receive(:open_registrations?).and_return(true)
|
||||
allow(helper).to receive_messages(closed_registrations?: false, open_registrations?: true)
|
||||
result = helper.sign_up_message
|
||||
|
||||
expect(result).to eq t('auth.register')
|
||||
|
@ -111,9 +109,7 @@ RSpec.describe HomeHelper do
|
|||
|
||||
context 'with approved registrations' do
|
||||
it 'returns correct sign up message' do
|
||||
allow(helper).to receive(:closed_registrations?).and_return(false)
|
||||
allow(helper).to receive(:open_registrations?).and_return(false)
|
||||
allow(helper).to receive(:approved_registrations?).and_return(true)
|
||||
allow(helper).to receive_messages(closed_registrations?: false, open_registrations?: false, approved_registrations?: true)
|
||||
result = helper.sign_up_message
|
||||
|
||||
expect(result).to eq t('auth.apply_for_account')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue