File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ module.exports = [
73
73
endDate = existing . endDate !== null ? new Date ( existing . endDate ) : null ;
74
74
}
75
75
76
- if ( startDate !== null && endDate !== null && startDate >= endDate ) {
77
- const err = new Error ( 'startDate must be before endDate.' ) ;
76
+ if ( startDate !== null && endDate !== null && startDate > endDate ) {
77
+ const err = new Error ( 'startDate must not be after endDate.' ) ;
78
78
err . status = 400 ;
79
79
reject ( err ) ;
80
80
} else {
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ describe('Project Phases', () => {
167
167
. expect ( 422 , done ) ;
168
168
} ) ;
169
169
170
- it ( 'should return 400 when startDate >= endDate' , ( done ) => {
170
+ it ( 'should return 400 when startDate > endDate' , ( done ) => {
171
171
request ( server )
172
172
. patch ( `/v4/projects/${ projectId } /phases/${ phaseId } ` )
173
173
. set ( {
You can’t perform that action at this time.
0 commit comments