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 = [
7373 endDate = existing . endDate !== null ? new Date ( existing . endDate ) : null ;
7474 }
7575
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.' ) ;
7878 err . status = 400 ;
7979 reject ( err ) ;
8080 } else {
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ describe('Project Phases', () => {
167167 . expect ( 422 , done ) ;
168168 } ) ;
169169
170- it ( 'should return 400 when startDate >= endDate' , ( done ) => {
170+ it ( 'should return 400 when startDate > endDate' , ( done ) => {
171171 request ( server )
172172 . patch ( `/v4/projects/${ projectId } /phases/${ phaseId } ` )
173173 . set ( {
You can’t perform that action at this time.
0 commit comments