Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Faust1-2 committed Aug 2, 2024
1 parent edc19f2 commit 0ab2cb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/app/components/inspection-header.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ describe('InspectionHeaderComponent', () => {
expect(component.id).toEqual(id);
});

it('should not change "id" if a undefined value is provided', () => {
component.id = undefined;
it('should not change "id" if a null value is provided', () => {
component.id = null;
expect(component.id).toEqual(id);
});
});
Expand Down
11 changes: 0 additions & 11 deletions src/app/components/show-page.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
import { TestBed } from '@angular/core/testing';
import { DataRaw } from '@app/types/data';
import { NotificationService } from '@services/notification.service';
import { ShowPageComponent } from './show-page.component';

describe('ShowPageComponent', () => {
let component: ShowPageComponent<DataRaw>;

const mockNotificationService = {
success: jest.fn()
};

beforeEach(() => {
component = TestBed.configureTestingModule({
providers: [
ShowPageComponent,
{provide: NotificationService, useValue: mockNotificationService}
]
}).inject(ShowPageComponent);
});
Expand All @@ -23,11 +17,6 @@ describe('ShowPageComponent', () => {
expect(component).toBeTruthy();
});

it('should call a notification success on copy', () => {
component.onCopiedTaskId();
expect(mockNotificationService.success).toHaveBeenCalledWith('Task ID copied to clipboard');
});

it('should emit on refresh', () => {
const refreshSpy = jest.spyOn(component.refresh, 'emit');
component.onRefresh();
Expand Down

0 comments on commit 0ab2cb8

Please sign in to comment.