Skip to content

Commit 7ad5341

Browse files
committed
Add test for if tenant does not have policy cached
1 parent 43a785a commit 7ad5341

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/auth/src/core/auth/auth_impl.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ describe('core/auth/auth_impl', () => {
845845
expect(auth._getPasswordPolicy()).to.eql(cachedPasswordPolicy);
846846
});
847847

848-
it('password policy should be set for tenant if tenant ID is not nul', async () => {
848+
it('password policy should be set for tenant if tenant ID is not null', async () => {
849849
auth = await testAuth();
850850
auth.tenantId = 'tenant-id';
851851
mockEndpointWithParams(
@@ -887,6 +887,8 @@ describe('core/auth/auth_impl', () => {
887887
expect(auth._getPasswordPolicy()).to.eql(
888888
cachedPasswordPolicyRequireNumeric
889889
);
890+
auth.tenantId = 'other-tenant-id';
891+
expect(auth._getPasswordPolicy()).to.be.undefined;
890892
});
891893

892894
it('password policy should not be set when the schema version is not supported', async () => {

0 commit comments

Comments
 (0)