diff --git a/ui/core/tests/acceptance/authentication-test.js b/ui/core/tests/acceptance/authentication-test.js index 113a78c07..d8bdb6162 100644 --- a/ui/core/tests/acceptance/authentication-test.js +++ b/ui/core/tests/acceptance/authentication-test.js @@ -37,6 +37,7 @@ module('Acceptance | authentication', function (hooks) { let authenticateURL; let authMethodAuthenticateURL; let authMethodGlobalAuthenticateURL; + let changePasswordURL; let orgsURL; let projectsURL; let usersURL; @@ -70,6 +71,7 @@ module('Acceptance | authentication', function (hooks) { authenticateURL = `/scopes/${orgScopeID}/authenticate`; authMethodGlobalAuthenticateURL = `/scopes/global/authenticate/${globalAuthMethodID}`; authMethodAuthenticateURL = `/scopes/${orgScopeID}/authenticate/${authMethodID}`; + changePasswordURL = `/account/change-password`; orgsURL = `/scopes/global/orgs`; projectsURL = `/scopes/${orgScopeID}/projects`; usersURL = `/scopes/${orgScopeID}/users`; @@ -113,6 +115,13 @@ module('Acceptance | authentication', function (hooks) { assert.notOk(currentSession().isAuthenticated); }); + test('visiting change password while unauthenticated redirects to first global authenticate method', async function (assert) { + assert.expect(2); + await visit(changePasswordURL); + assert.equal(currentURL(), authMethodGlobalAuthenticateURL); + assert.notOk(currentSession().isAuthenticated); + }); + test('visiting orgs while unauthenticated redirects to first global authenticate method', async function (assert) { assert.expect(2); await visit(orgsURL);