diff options
Diffstat (limited to 'tests/units/Validator/TaskValidatorTest.php')
-rw-r--r-- | tests/units/Validator/TaskValidatorTest.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/units/Validator/TaskValidatorTest.php b/tests/units/Validator/TaskValidatorTest.php index 5c1b9a52..12c5a497 100644 --- a/tests/units/Validator/TaskValidatorTest.php +++ b/tests/units/Validator/TaskValidatorTest.php @@ -68,10 +68,19 @@ class TaskValidatorTest extends Base $this->assertFalse($result[0]); } - public function testDateField() + public function testStartAndDueDateFields() { $taskValidator = new TaskValidator($this->container); + $result = $taskValidator->validateCreation(array('project_id' => 1, 'title' => 'test', 'date_due' => '09/11/2017 10:50', 'date_started' => '09/11/2017 9:50')); + $this->assertTrue($result[0]); + + $result = $taskValidator->validateCreation(array('project_id' => 1, 'title' => 'test', 'date_due' => '09/11/2017 10:50', 'date_started' => '09/11/2017 10:50')); + $this->assertTrue($result[0]); + + $result = $taskValidator->validateCreation(array('project_id' => 1, 'title' => 'test', 'date_due' => '09/11/2017 10:50', 'date_started' => '09/11/2017 11:50')); + $this->assertFalse($result[0]); + // date_due // ISO dates $result = $taskValidator->validateCreation(array('project_id' => 1, 'title' => 'test', 'date_due' => '2017-02-01')); |