File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
src/app/modules/time-clock/services Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,18 @@ describe('EntryService', () => {
4040 } ) ;
4141
4242 it ( 'loads an activeEntry with /running' , ( ) => {
43+ service . showOptionInDevelopment = true ;
44+ service . loadActiveEntry ( ) . subscribe ( ) ;
45+
46+ const loadEntryRequest = httpMock . expectOne ( `${ service . baseUrl } /running` ) ;
47+ expect ( loadEntryRequest . request . method ) . toBe ( 'GET' ) ;
48+ } ) ;
49+
50+ it ( 'loads an activeEntry with /active/{userId}' , ( ) => {
51+ service . showOptionInDevelopment = false ;
4352 service . loadActiveEntry ( ) . subscribe ( ) ;
44- let path = '' ;
45- if ( service . showOptionInDevelopment ) {
46- path = `${ service . baseUrl } }/running` ;
47- } else {
48- path = `${ service . baseUrl } /active/2` ;
49- }
5053
51- const loadEntryRequest = httpMock . expectOne ( path ) ;
54+ const loadEntryRequest = httpMock . expectOne ( ` ${ service . baseUrl } /active/2` ) ;
5255 expect ( loadEntryRequest . request . method ) . toBe ( 'GET' ) ;
5356 } ) ;
5457
You can’t perform that action at this time.
0 commit comments