fix: 24982- Remove'Signed in successfully' message
After this change the sign-in-success flash message will not be shown refactor: set flash message to be nil while signing in test: changed tests to reflect removal of sign-in message refactor: adding signed_in message back See Merge Request !7837 issue#24982
This commit is contained in:
parent
e09c6df068
commit
6ab74b1cb3
4 changed files with 11 additions and 6 deletions
|
@ -31,6 +31,8 @@ class SessionsController < Devise::SessionsController
|
|||
resource.update_attributes(reset_password_token: nil,
|
||||
reset_password_sent_at: nil)
|
||||
end
|
||||
# hide the signed-in notification
|
||||
flash[:notice] = nil
|
||||
log_audit_event(current_user, with: authentication_method)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: 'fix: 24982- Remove''Signed in successfully'' message After this change the
|
||||
sign-in-success flash message will not be shown'
|
||||
merge_request: 7837
|
||||
author: jnoortheen
|
|
@ -22,7 +22,6 @@ describe SessionsController do
|
|||
it 'authenticates user correctly' do
|
||||
post(:create, user: { login: user.username, password: user.password })
|
||||
|
||||
expect(response).to set_flash.to /Signed in successfully/
|
||||
expect(subject.current_user). to eq user
|
||||
end
|
||||
|
||||
|
|
|
@ -163,8 +163,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature:
|
|||
click_on "Sign in via U2F device"
|
||||
expect(page.body).to match('We heard back from your U2F device')
|
||||
click_on "Authenticate via U2F Device"
|
||||
|
||||
expect(page.body).to match('Signed in successfully')
|
||||
expect(page.body).to match('href="/users/sign_out"')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -178,7 +177,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature:
|
|||
expect(page.body).to match('We heard back from your U2F device')
|
||||
click_on "Authenticate via U2F Device"
|
||||
|
||||
expect(page.body).to match('Signed in successfully')
|
||||
expect(page.body).to match('href="/users/sign_out"')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -234,7 +233,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature:
|
|||
expect(page.body).to match('We heard back from your U2F device')
|
||||
click_on "Authenticate via U2F Device"
|
||||
|
||||
expect(page.body).to match('Signed in successfully')
|
||||
expect(page.body).to match('href="/users/sign_out"')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -275,7 +274,7 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', feature:
|
|||
expect(page.body).to match('We heard back from your U2F device')
|
||||
click_on "Authenticate via U2F Device"
|
||||
|
||||
expect(page.body).to match('Signed in successfully')
|
||||
expect(page.body).to match('href="/users/sign_out"')
|
||||
|
||||
logout
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue