Fixes #2640 - Signup view broken after logout.
This commit is contained in:
parent
13ddd3af38
commit
39e6dbe05a
2 changed files with 14 additions and 2 deletions
|
@ -163,8 +163,10 @@ class App.Auth
|
|||
App.Event.trigger('auth')
|
||||
App.Event.trigger('auth:logout')
|
||||
if rerender
|
||||
window.location.href = '#login'
|
||||
App.Event.trigger('ui:rerender')
|
||||
@loginCheck(->
|
||||
window.location.href = '#login'
|
||||
App.Event.trigger('ui:rerender')
|
||||
)
|
||||
App.Event.trigger('clearStore')
|
||||
|
||||
@_loginError: ->
|
||||
|
|
|
@ -15,4 +15,14 @@ RSpec.describe 'Authentication', type: :system do
|
|||
logout
|
||||
expect_current_route 'login', wait: 2
|
||||
end
|
||||
|
||||
it 'will unset user attributes after logout' do
|
||||
logout
|
||||
expect_current_route 'login', wait: 2
|
||||
|
||||
visit '/#signup'
|
||||
|
||||
# check wrong displayed fields in registration form after logout. #2989
|
||||
page.should_not have_selector('select[name=organization_id]')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue