Skip to content

Commit 0800fa8

Browse files
committed
fix: TT-264 I divided each unit testing with line breaks
1 parent 829bc65 commit 0800fa8

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

src/app/modules/customer-management/components/projects/components/project-list/project-list.component.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,19 @@ describe('ProjectListComponent', () => {
9494
it('should destroy the projectTypesSubscription', () => {
9595
component.projectTypesSubscription = new Subscription();
9696
const subscriptionProjectTypes = spyOn(component.projectTypesSubscription, 'unsubscribe');
97+
9798
component.ngOnDestroy();
99+
98100
expect(subscriptionProjectTypes).toHaveBeenCalledTimes(1);
99101

100102
});
103+
101104
it('updateProject, should dispatch SetProjectToEdit action', () => {
102105
spyOn(store, 'dispatch');
103106
component.projectsSubscription = new Subscription();
104107
const subscription = spyOn(component.projectsSubscription, 'unsubscribe');
105108

106109
component.updateProject(project);
107-
108110
component.ngOnDestroy();
109111

110112
expect(subscription).toHaveBeenCalledTimes(1);
@@ -178,6 +180,7 @@ describe('ProjectListComponent', () => {
178180
};
179181

180182
component.openModal(itemData);
183+
181184
expect(component.idToDelete).toEqual(itemData.id);
182185
expect(component.showModal).toBeTrue();
183186
});

src/app/modules/login/services/azure.ad.b2c.service.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ describe('AzureAdB2CService', () => {
174174

175175
it('should get userId from UserAgentApplication', () => {
176176
spyOn(UserAgentApplication.prototype, 'getAccount').and.returnValues(account);
177+
177178
service.getUserId();
178179

179180
expect(UserAgentApplication.prototype.getAccount).toHaveBeenCalled();

src/app/modules/user/services/user-info.service.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ describe('UserInfoService', () => {
6060

6161
it('should return true if is Admin', () => {
6262
const isMemberOf = spyOn(service, 'isMemberOf').and.returnValue(of(true));
63+
6364
service.isAdmin().subscribe((value) => {
6465
expect(value).toBeTrue();
6566
});
@@ -68,6 +69,7 @@ describe('UserInfoService', () => {
6869

6970
it('should return true if is Tester', () => {
7071
const isMemberOf = spyOn(service, 'isMemberOf').and.returnValue(of(true));
72+
7173
service.isTester().subscribe((value) => {
7274
expect(value).toBeTrue();
7375
});

src/app/modules/user/services/user.service.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ describe('UserService', () => {
3030
it('load a user to idUser using GET', () => {
3131
service.baseUrl = '/users';
3232
service.loadUser('xyz').subscribe();
33+
3334
const loadUserRequest = httpMock.expectOne(`${service.baseUrl}/xyz`);
3435
expect(loadUserRequest.request.method).toBe('GET');
3536
});

0 commit comments

Comments
 (0)