Rename settings partials to match naming conventions

This commit is contained in:
Dominik Kwiatek 2020-10-21 13:49:12 +02:00
parent 556050aa66
commit d3cc421225
4 changed files with 4 additions and 4 deletions

View File

@ -2,6 +2,6 @@
.card-body
%h2= t('views.settings.security.2fa.title')
- if current_user.otp_module_disabled?
= render partial: 'settings/security/totp-setup', locals: { qr_svg: qr_svg }
= render partial: 'settings/totp_setup', locals: { qr_svg: qr_svg }
- else
= render partial: 'settings/security/totp-enabled'
= render partial: 'settings/totp_enabled'

View File

@ -74,7 +74,7 @@ describe UserController, type: :controller do
it "shows a setup form for users who don't have 2FA enabled" do
subject
expect(response).to have_rendered(:edit_security)
expect(response).to have_rendered(partial: 'settings/security/_totp-setup')
expect(response).to have_rendered(partial: 'settings/security/_totp_setup')
end
it "shows the option to disable 2FA for users who have 2FA already enabled" do
@ -83,7 +83,7 @@ describe UserController, type: :controller do
subject
expect(response).to have_rendered(:edit_security)
expect(response).to have_rendered(partial: 'settings/security/_totp-enabled')
expect(response).to have_rendered(partial: 'settings/security/_totp_enabled')
end
end
end