Skip to content

Commit 2c24571

Browse files
committed
fix: init input in test
1 parent 466b068 commit 2c24571

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

src/app/components/service-card/service-card.component.spec.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
2-
32
import { ServiceCardComponent } from './service-card.component';
3+
import { ServiceCard } from '../../types/dtos';
44

55
describe('ServiceCardComponent', () => {
66
let component: ServiceCardComponent;
77
let fixture: ComponentFixture<ServiceCardComponent>;
88

9+
const mockService: ServiceCard = {
10+
legalParticipant: {
11+
id: 1,
12+
name: 'Participant',
13+
},
14+
legalRegistrationNumber: {
15+
id: 1,
16+
countryCode: 'de',
17+
},
18+
serviceOffering: {
19+
id: 1,
20+
name: 'Service Offering',
21+
description: ['A description'],
22+
},
23+
serviceAccessPoints: [],
24+
physicalResources: [],
25+
dataResources: [],
26+
};
27+
928
beforeEach(async () => {
1029
await TestBed.configureTestingModule({
1130
imports: [ServiceCardComponent],
1231
}).compileComponents();
1332

1433
fixture = TestBed.createComponent(ServiceCardComponent);
1534
component = fixture.componentInstance;
35+
component.service = mockService;
1636
fixture.detectChanges();
1737
});
1838

0 commit comments

Comments
 (0)