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')
|
||||||
App.Event.trigger('auth:logout')
|
App.Event.trigger('auth:logout')
|
||||||
if rerender
|
if rerender
|
||||||
window.location.href = '#login'
|
@loginCheck(->
|
||||||
App.Event.trigger('ui:rerender')
|
window.location.href = '#login'
|
||||||
|
App.Event.trigger('ui:rerender')
|
||||||
|
)
|
||||||
App.Event.trigger('clearStore')
|
App.Event.trigger('clearStore')
|
||||||
|
|
||||||
@_loginError: ->
|
@_loginError: ->
|
||||||
|
|
|
@ -15,4 +15,14 @@ RSpec.describe 'Authentication', type: :system do
|
||||||
logout
|
logout
|
||||||
expect_current_route 'login', wait: 2
|
expect_current_route 'login', wait: 2
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Reference in a new issue