Skip to content
Snippets Groups Projects
Commit bc6ba819 authored by Tormod Nygård's avatar Tormod Nygård
Browse files

Test: Fix of tests for user (#9)

parent befc2df1
No related branches found
No related tags found
1 merge request!13Resolve "Logge inn / bruker autentisering - både Frontend og Backend"
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AuthService } from './auth.service';
......@@ -6,7 +8,9 @@ describe('AuthService', () => {
let service: AuthService;
beforeEach(() => {
TestBed.configureTestingModule({});
TestBed.configureTestingModule({
imports: [ HttpClientTestingModule, RouterTestingModule ]
});
service = TestBed.inject(AuthService);
});
......
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { UserLoginFormComponent } from './user-login-form.component';
......@@ -8,7 +10,8 @@ describe('UserLoginFormComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ UserLoginFormComponent ]
declarations: [ UserLoginFormComponent ],
imports: [ HttpClientTestingModule, RouterTestingModule ]
})
.compileComponents();
});
......
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { UserProfileComponent } from './user-profile.component';
......@@ -8,7 +10,8 @@ describe('UserProfileComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ UserProfileComponent ]
declarations: [ UserProfileComponent ],
imports: [ HttpClientTestingModule, RouterTestingModule ]
})
.compileComponents();
});
......
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { UserRegistrationFormComponent } from './user-registration-form.component';
......@@ -8,7 +10,8 @@ describe('UserRegistrationFormComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ UserRegistrationFormComponent ]
declarations: [ UserRegistrationFormComponent ],
imports: [ HttpClientTestingModule, RouterTestingModule ]
})
.compileComponents();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment