Browse Source

Remove flash banner

pull/580/head
baarkerlounger 3 years ago
parent
commit
6555373369
  1. 1
      app/controllers/auth/confirmations_controller.rb
  2. 2
      app/models/user.rb
  3. 2
      spec/features/organisation_spec.rb

1
app/controllers/auth/confirmations_controller.rb

@ -5,7 +5,6 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
yield resource if block_given?
if resource.errors.empty?
set_flash_message!(:notice, :confirmed)
if resource.sign_in_count.zero?
token = resource.send(:set_reset_password_token)
redirect_to controller: "auth/passwords", action: "edit", reset_password_token: token, confirmation: true

2
app/models/user.rb

@ -86,7 +86,7 @@ class User < ApplicationRecord
end
def skip_confirmation!
!user.active?
!active?
end
def need_two_factor_authentication?(_request)

2
spec/features/organisation_spec.rb

@ -13,7 +13,7 @@ RSpec.describe "User Features" do
before do
allow(DeviseNotifyMailer).to receive(:new).and_return(devise_notify_mailer)
allow(devise_notify_mailer).to receive(:notify_client).and_return(notify_client)
allow(Devise.token_generator).to receive(:generate).and_return(confirmation_token)
allow(Devise).to receive(:friendly_token).and_return(confirmation_token)
allow(notify_client).to receive(:send_email).and_return(true)
sign_in user
end

Loading…
Cancel
Save