@@ -6,7 +6,6 @@ import { provideMockStore, MockStore } from '@ngrx/store/testing';
66import { TimeClockComponent } from './time-clock.component' ;
77import { ProjectState } from '../../customer-management/components/projects/components/store/project.reducer' ;
88import { ProjectListHoverComponent } from '../components' ;
9- import { ProjectService } from '../../customer-management/components/projects/components/services/project.service' ;
109import { FilterProjectPipe } from '../../shared/pipes' ;
1110import { AzureAdB2CService } from '../../login/services/azure.ad.b2c.service' ;
1211import { ActionsSubject } from '@ngrx/store' ;
@@ -15,7 +14,6 @@ describe('TimeClockComponent', () => {
1514 let component : TimeClockComponent ;
1615 let fixture : ComponentFixture < TimeClockComponent > ;
1716 let store : MockStore < ProjectState > ;
18- let projectService : ProjectService ;
1917 let azureAdB2CService : AzureAdB2CService ;
2018 const actionSub : ActionsSubject = new ActionsSubject ( ) ;
2119 const state = {
@@ -46,7 +44,7 @@ describe('TimeClockComponent', () => {
4644 TestBed . configureTestingModule ( {
4745 imports : [ HttpClientTestingModule ] ,
4846 declarations : [ TimeClockComponent , ProjectListHoverComponent , FilterProjectPipe ] ,
49- providers : [ ProjectService ,
47+ providers : [
5048 AzureAdB2CService ,
5149 { provide : ActionsSubject , useValue : actionSub } ,
5250 provideMockStore ( { initialState : state } ) ] ,
@@ -58,7 +56,6 @@ describe('TimeClockComponent', () => {
5856 fixture = TestBed . createComponent ( TimeClockComponent ) ;
5957 component = fixture . componentInstance ;
6058 fixture . detectChanges ( ) ;
61- projectService = TestBed . inject ( ProjectService ) ;
6259 azureAdB2CService = TestBed . inject ( AzureAdB2CService ) ;
6360 } ) ;
6461
@@ -82,13 +79,6 @@ describe('TimeClockComponent', () => {
8279 expect ( azureAdB2CService . getName ) . toHaveBeenCalledTimes ( 0 ) ;
8380 } ) ;
8481
85- it ( 'Service injected via inject(...) and TestBed.get(...) should be the same instance' , inject (
86- [ ProjectService ] ,
87- ( injectService : ProjectService ) => {
88- expect ( injectService ) . toBe ( projectService ) ;
89- }
90- ) ) ;
91-
9282 it ( 'clockOut dispatch a StopTimeEntryRunning action' , ( ) => {
9383 spyOn ( store , 'dispatch' ) ;
9484
0 commit comments