File tree Expand file tree Collapse file tree 2 files changed +2
-18
lines changed
src/app/modules/time-clock/services Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -40,21 +40,12 @@ describe('EntryService', () => {
40
40
} ) ;
41
41
42
42
it ( 'loads an activeEntry with /running' , ( ) => {
43
- service . showOptionInDevelopment = true ;
44
43
service . loadActiveEntry ( ) . subscribe ( ) ;
45
44
46
45
const loadEntryRequest = httpMock . expectOne ( `${ service . baseUrl } /running` ) ;
47
46
expect ( loadEntryRequest . request . method ) . toBe ( 'GET' ) ;
48
47
} ) ;
49
48
50
- it ( 'loads an activeEntry with /active/{userId}' , ( ) => {
51
- service . showOptionInDevelopment = false ;
52
- service . loadActiveEntry ( ) . subscribe ( ) ;
53
-
54
- const loadEntryRequest = httpMock . expectOne ( `${ service . baseUrl } /active/2` ) ;
55
- expect ( loadEntryRequest . request . method ) . toBe ( 'GET' ) ;
56
- } ) ;
57
-
58
49
it ( 'loads summary with get /summary?time_offset=<time-offset>' , ( ) => {
59
50
service . summary ( ) . subscribe ( ) ;
60
51
const timeOffset = new Date ( ) . getTimezoneOffset ( ) ;
Original file line number Diff line number Diff line change 1
1
import { TimeEntriesSummary } from '../models/time.entry.summary' ;
2
- import { Injectable , Input } from '@angular/core' ;
2
+ import { Injectable } from '@angular/core' ;
3
3
import { HttpClient } from '@angular/common/http' ;
4
4
5
5
import { Observable } from 'rxjs' ;
@@ -19,16 +19,9 @@ export class EntryService {
19
19
20
20
static TIME_ENTRIES_DATE_TIME_FORMAT = 'yyyy-MM-ddTHH:mm:ssZZZZZ' ;
21
21
baseUrl = `${ environment . timeTrackerApiUrl } /time-entries` ;
22
- @Input ( ) showOptionInDevelopment : boolean ;
23
22
24
23
loadActiveEntry ( ) : Observable < any > {
25
- let path = '' ;
26
- if ( this . showOptionInDevelopment ) {
27
- path = `${ this . baseUrl } /running` ;
28
- } else {
29
- path = `${ this . baseUrl } /active/2` ;
30
- }
31
- return this . http . get ( path ) ;
24
+ return this . http . get ( `${ this . baseUrl } /running` ) ;
32
25
}
33
26
34
27
loadEntries ( date ) : Observable < any > {
You can’t perform that action at this time.
0 commit comments