diff --git a/src/app/pages/suggest-agenda/suggest-agenda.component.spec.ts b/src/app/pages/suggest-agenda/suggest-agenda.component.spec.ts index 529d591d..dd1dea71 100644 --- a/src/app/pages/suggest-agenda/suggest-agenda.component.spec.ts +++ b/src/app/pages/suggest-agenda/suggest-agenda.component.spec.ts @@ -1,6 +1,9 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; - +import { HttpClientTestingModule } from '@angular/common/http/testing'; import { SuggestAgendaComponent } from './suggest-agenda.component'; +import { EmailService } from 'src/app/services/email.service'; +import { FormBuilder } from '@angular/forms'; +import { ReactiveFormsModule } from '@angular/forms'; describe('SuggestAgendaComponent', () => { let component: SuggestAgendaComponent; @@ -8,7 +11,10 @@ describe('SuggestAgendaComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ SuggestAgendaComponent ] + declarations: [ SuggestAgendaComponent ], + imports: [HttpClientTestingModule, + ReactiveFormsModule], + providers: [{ provide: EmailService, FormBuilder}] }) .compileComponents(); diff --git a/src/app/pages/video-viewer/video-viewer.component.spec.ts b/src/app/pages/video-viewer/video-viewer.component.spec.ts index feaf9281..e682490b 100644 --- a/src/app/pages/video-viewer/video-viewer.component.spec.ts +++ b/src/app/pages/video-viewer/video-viewer.component.spec.ts @@ -2,8 +2,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from "@angular/router/testing"; import { VideoViewerComponent } from './video-viewer.component'; -import { VideoService } from './video.service'; import { SafePipe } from 'src/app/pipes/safe.pipe'; +import { VideoService } from 'src/app/services/video.service'; describe('VideoViewerComponent', () => { let component: VideoViewerComponent; diff --git a/src/app/pages/video/video.component.spec.ts b/src/app/pages/video/video.component.spec.ts index 79fd12db..5e94afc2 100644 --- a/src/app/pages/video/video.component.spec.ts +++ b/src/app/pages/video/video.component.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { VideoComponent } from './video.component'; -import { VideoService } from './video.service'; +import { VideoService } from 'src/app/services/video.service'; describe('VideoComponent', () => { let component: VideoComponent; diff --git a/src/app/services/email.service.spec.ts b/src/app/services/email.service.spec.ts index 1d765b40..a47083aa 100644 --- a/src/app/services/email.service.spec.ts +++ b/src/app/services/email.service.spec.ts @@ -1,12 +1,15 @@ import { TestBed } from '@angular/core/testing'; - +import { HttpClientTestingModule } from '@angular/common/http/testing'; import { EmailService } from './email.service'; describe('EmailService', () => { let service: EmailService; beforeEach(() => { - TestBed.configureTestingModule({}); + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [EmailService] + }); service = TestBed.inject(EmailService); }); diff --git a/src/app/services/video.service.spec.ts b/src/app/services/video.service.spec.ts index 3378e3ce..84e13dd8 100644 --- a/src/app/services/video.service.spec.ts +++ b/src/app/services/video.service.spec.ts @@ -1,8 +1,8 @@ import { TestBed } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { VideoService } from './video.service'; import { EDUPLAY_API_URL, UNB_ID } from 'src/app/app.constant'; -import { EDUPLAY_CLIENT_KEY } from 'src/app/secret/eduplay.credentials'; +import { EDUPLAY_CLIENT_KEY } from '../environment/environment'; +import { VideoService } from './video.service'; describe('VideoService', () => { let service: VideoService;