Skip to content

Commit

Permalink
fix unit
Browse files Browse the repository at this point in the history
  • Loading branch information
shuowu committed Nov 21, 2021
1 parent d8fdd28 commit 1666e92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/spec/callback.component.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -45,7 +46,7 @@ describe('OktaCallbackComponent', () => {
useValue: config
},
{
provide: OktaAuth,
provide: OKTA_AUTH,
useValue: oktaAuth
},
],
Expand Down
5 changes: 3 additions & 2 deletions test/spec/module.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { AuthSdkError, OktaAuth } from '@okta/okta-auth-js';
import {
OktaAuthModule,
OKTA_CONFIG,
OKTA_AUTH,
OktaAuthStateService,
OktaAuthGuard
} from '../../src/okta-angular';
Expand Down Expand Up @@ -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();
});
});
Expand All @@ -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);
Expand Down

0 comments on commit 1666e92

Please sign in to comment.