mirror of
https://github.com/fabioformosa/quartz-manager.git
synced 2026-05-14 22:00:30 +09:00
fixed tests
This commit is contained in:
@@ -2,7 +2,6 @@ import { TestBed, async } from '@angular/core/testing';
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
import { HomeComponent } from './home';
|
||||
import { ManagerComponent } from './manager';
|
||||
import { LoginComponent } from './login';
|
||||
import { MockApiService } from './service/mocks/api.service.mock';
|
||||
@@ -10,7 +9,6 @@ import { MockApiService } from './service/mocks/api.service.mock';
|
||||
import { LoginGuard } from './guard';
|
||||
import { NotFoundComponent } from './not-found';
|
||||
import {
|
||||
ApiCardComponent,
|
||||
FooterComponent,
|
||||
GithubComponent,
|
||||
} from './component';
|
||||
|
||||
@@ -16,7 +16,7 @@ describe('AdminGuard', () => {
|
||||
{
|
||||
provide: Router,
|
||||
useClass: RouterStub
|
||||
}
|
||||
},
|
||||
{
|
||||
provide: UserService,
|
||||
useClass: MockUserService
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import {
|
||||
MatCardModule, MatInputModule, MatProgressSpinnerModule, MatProgressBarModule
|
||||
} from '@angular/material';
|
||||
import { SignupComponent } from './signup.component';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import {
|
||||
MockUserService,
|
||||
MockApiService
|
||||
} from 'app/service/mocks';
|
||||
import {
|
||||
UserService,
|
||||
AuthService,
|
||||
ApiService,
|
||||
ConfigService
|
||||
} from 'app/service';
|
||||
|
||||
describe('SignupComponent', () => {
|
||||
let component: SignupComponent;
|
||||
@@ -8,7 +23,25 @@ describe('SignupComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ SignupComponent ]
|
||||
declarations: [ SignupComponent ],
|
||||
imports : [RouterTestingModule,
|
||||
BrowserAnimationsModule,
|
||||
MatCardModule,
|
||||
MatInputModule,
|
||||
MatProgressSpinnerModule,
|
||||
MatProgressBarModule,
|
||||
ReactiveFormsModule],
|
||||
providers: [
|
||||
{
|
||||
provide: UserService,
|
||||
useClass: MockUserService
|
||||
},
|
||||
{
|
||||
provide: ApiService,
|
||||
useClass: MockApiService
|
||||
},
|
||||
AuthService,
|
||||
ConfigService]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user