1
0

import of initial customer.jdl including related entities

This commit is contained in:
Michael Hoennig
2019-04-03 10:56:31 +02:00
parent acd28d679c
commit 1e7b801e22
205 changed files with 15363 additions and 0 deletions

View File

@ -0,0 +1,40 @@
/* tslint:disable max-line-length */
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ActivatedRoute } from '@angular/router';
import { of } from 'rxjs';
import { HsadminNgTestModule } from '../../../test.module';
import { CustomerDetailComponent } from 'app/entities/customer/customer-detail.component';
import { Customer } from 'app/shared/model/customer.model';
describe('Component Tests', () => {
describe('Customer Management Detail Component', () => {
let comp: CustomerDetailComponent;
let fixture: ComponentFixture<CustomerDetailComponent>;
const route = ({ data: of({ customer: new Customer(123) }) } as any) as ActivatedRoute;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HsadminNgTestModule],
declarations: [CustomerDetailComponent],
providers: [{ provide: ActivatedRoute, useValue: route }]
})
.overrideTemplate(CustomerDetailComponent, '')
.compileComponents();
fixture = TestBed.createComponent(CustomerDetailComponent);
comp = fixture.componentInstance;
});
describe('OnInit', () => {
it('Should call load all on init', () => {
// GIVEN
// WHEN
comp.ngOnInit();
// THEN
expect(comp.customer).toEqual(jasmine.objectContaining({ id: 123 }));
});
});
});
});