Commit 859af4d5 authored by David Burke's avatar David Burke

Fix tests

parent c7880df9
Pipeline #63382886 passed with stage
in 7 minutes and 19 seconds
This diff is collapsed.
...@@ -74,7 +74,8 @@ describe("Change Password Component", () => { ...@@ -74,7 +74,8 @@ describe("Change Password Component", () => {
publicKey: "", publicKey: "",
rememberMe: false, rememberMe: false,
userId: 1, userId: 1,
userToken: "" userToken: "",
mfaRequired: false
}) })
); );
fixture.detectChanges(); fixture.detectChanges();
......
...@@ -3,6 +3,7 @@ import { ...@@ -3,6 +3,7 @@ import {
HttpClientTestingModule, HttpClientTestingModule,
HttpTestingController HttpTestingController
} from "@angular/common/http/testing"; } from "@angular/common/http/testing";
import { RouterTestingModule } from "@angular/router/testing";
import { AuthInterceptor } from "./auth.interceptor"; import { AuthInterceptor } from "./auth.interceptor";
import { HTTP_INTERCEPTORS, HttpClient } from "@angular/common/http"; import { HTTP_INTERCEPTORS, HttpClient } from "@angular/common/http";
import { StoreModule, Store } from "@ngrx/store"; import { StoreModule, Store } from "@ngrx/store";
...@@ -21,7 +22,8 @@ describe(`AuthHttpInterceptor`, () => { ...@@ -21,7 +22,8 @@ describe(`AuthHttpInterceptor`, () => {
imports: [ imports: [
HttpClientTestingModule, HttpClientTestingModule,
StoreModule.forRoot({}), StoreModule.forRoot({}),
StoreModule.forFeature("account", reducers) StoreModule.forFeature("account", reducers),
RouterTestingModule.withRoutes([])
], ],
providers: [ providers: [
{ {
......
...@@ -42,7 +42,8 @@ describe("AccountReducer", () => { ...@@ -42,7 +42,8 @@ describe("AccountReducer", () => {
userId: 1, userId: 1,
userToken: "aaa", userToken: "aaa",
rememberMe: false, rememberMe: false,
optInErrorReporting: false optInErrorReporting: false,
mfaRequired: false
}; };
const createAction = new LoginSuccessAction(user); const createAction = new LoginSuccessAction(user);
...@@ -55,7 +56,8 @@ describe("AccountReducer", () => { ...@@ -55,7 +56,8 @@ describe("AccountReducer", () => {
url: fromAuth.initialState.url, url: fromAuth.initialState.url,
rememberMe: false, rememberMe: false,
optInErrorReporting: false, optInErrorReporting: false,
forceSetPassword: false forceSetPassword: false,
mfaRequired: false
}; };
const result = fromAuth.authReducer(fromAuth.initialState, createAction); const result = fromAuth.authReducer(fromAuth.initialState, createAction);
...@@ -92,7 +94,8 @@ describe("AccountReducer", () => { ...@@ -92,7 +94,8 @@ describe("AccountReducer", () => {
userId: 1, userId: 1,
userToken: "aaa", userToken: "aaa",
rememberMe: false, rememberMe: false,
optInErrorReporting: false optInErrorReporting: false,
mfaRequired: false
}; };
store.dispatch(new LoginSuccessAction(user)); store.dispatch(new LoginSuccessAction(user));
isLoggedInSelector isLoggedInSelector
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment