From 1666e929ac29b53f84eb95ecd5a91c2f09c1e1e0 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Sun, 21 Nov 2021 12:15:51 -0500 Subject: [PATCH] fix unit --- test/spec/callback.component.test.ts | 3 ++- test/spec/module.test.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/spec/callback.component.test.ts b/test/spec/callback.component.test.ts index e46f8aeb..5b16514c 100644 --- a/test/spec/callback.component.test.ts +++ b/test/spec/callback.component.test.ts @@ -4,6 +4,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { OktaAuth } from '@okta/okta-auth-js'; import { OKTA_CONFIG, + OKTA_AUTH, OktaCallbackComponent } from '../../src/okta-angular'; @@ -45,7 +46,7 @@ describe('OktaCallbackComponent', () => { useValue: config }, { - provide: OktaAuth, + provide: OKTA_AUTH, useValue: oktaAuth }, ], diff --git a/test/spec/module.test.ts b/test/spec/module.test.ts index 6830aa8c..d4ac474c 100644 --- a/test/spec/module.test.ts +++ b/test/spec/module.test.ts @@ -5,6 +5,7 @@ import { AuthSdkError, OktaAuth } from '@okta/okta-auth-js'; import { OktaAuthModule, OKTA_CONFIG, + OKTA_AUTH, OktaAuthStateService, OktaAuthGuard } from '../../src/okta-angular'; @@ -94,7 +95,7 @@ describe('Okta Module', () => { describe('default restoreOriginalUri', () => { it('sets default restoreOriginalUri', () => { setup(oktaAuth); - const injectedOktaAuth = TestBed.get(OktaAuth); + const injectedOktaAuth = TestBed.get(OKTA_AUTH); expect(injectedOktaAuth.options.restoreOriginalUri).toBeDefined(); }); }); @@ -110,7 +111,7 @@ describe('Okta Module', () => { describe('DI', () => { it('provides OktaAuth', () => { setup(oktaAuth); - expect(TestBed.get(OktaAuth)).toBeDefined(); + expect(TestBed.get(OKTA_AUTH)).toBeDefined(); }); it('provides AuthStateService', () => { setup(oktaAuth);