diff --git a/app/views/settings/_security.haml b/app/views/settings/_security.haml index 5217bc6a..e9bfa3b4 100644 --- a/app/views/settings/_security.haml +++ b/app/views/settings/_security.haml @@ -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' diff --git a/app/views/settings/security/_totp-enabled.haml b/app/views/settings/security/_totp_enabled.haml similarity index 100% rename from app/views/settings/security/_totp-enabled.haml rename to app/views/settings/security/_totp_enabled.haml diff --git a/app/views/settings/security/_totp-setup.haml b/app/views/settings/security/_totp_setup.haml similarity index 100% rename from app/views/settings/security/_totp-setup.haml rename to app/views/settings/security/_totp_setup.haml diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index dea62bc3..b4bf4b01 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -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