redirect to show_accounts_or_dashboard on login

show_accounts_or_dashboard has logic about where you should redirect
to. If we let it do this, then that's nicer than duplicating its
logic. We found that it wasn't accounting for orgs in redirects
properly.
This commit is contained in:
Leo Hemsted
2018-03-19 16:38:57 +00:00
parent 90c40075c8
commit e000552e56
3 changed files with 10 additions and 51 deletions

View File

@@ -100,7 +100,7 @@ def test_should_sign_in_when_password_reset_is_successful_for_email_auth(
response = client.post(url_for('.new_password', token=token), data={'new_password': 'a-new_password'})
assert response.status_code == 302
assert response.location == url_for('.choose_account', _external=True)
assert response.location == url_for('.show_accounts_or_dashboard', _external=True)
assert mock_get_user_by_email_request_password_reset.called
assert mock_reset_failed_login_count.called