0
0
Fork 0

Remove remaining without_partial_double_verification usage (#28127)

This commit is contained in:
Matt Jankowski 2023-12-07 07:15:50 -05:00 committed by GitHub
parent 1d7b8234c9
commit 0b4a3a0437
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 41 deletions

View file

@ -29,15 +29,25 @@ describe ApplicationHelper do
describe 'body_classes' do
context 'with a body class string from a controller' do
before do
without_partial_double_verification do
allow(helper).to receive_messages(body_class_string: 'modal-layout compose-standalone', current_theme: 'default', current_account: Fabricate(:account))
end
end
before { helper.extend controller_helpers }
it 'uses the controller body classes in the result' do
expect(helper.body_classes).to match(/modal-layout compose-standalone/)
end
private
def controller_helpers
Module.new do
def body_class_string = 'modal-layout compose-standalone'
def current_account
@current_account ||= Fabricate(:account)
end
def current_theme = 'default'
end
end
end
end
@ -122,9 +132,7 @@ describe ApplicationHelper do
describe 'available_sign_up_path' do
context 'when registrations are closed' do
before do
without_partial_double_verification do
allow(Setting).to receive(:registrations_mode).and_return('none')
end
allow(Setting).to receive(:[]).with('registrations_mode').and_return 'none'
end
it 'redirects to joinmastodon site' do