From 6b4786624be70c4c024b829407a7496eec361cbb Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 18 Aug 2015 21:39:43 -0400 Subject: Add start and end date for projects --- tests/units/ProjectTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/units') diff --git a/tests/units/ProjectTest.php b/tests/units/ProjectTest.php index 45bc63fc..b7f168d7 100644 --- a/tests/units/ProjectTest.php +++ b/tests/units/ProjectTest.php @@ -44,6 +44,18 @@ class ProjectTest extends Base $this->assertEmpty($project['token']); } + public function testCreationWithStartAndDate() + { + $p = new Project($this->container); + + $this->assertEquals(1, $p->create(array('name' => 'UnitTest', 'start_date' => '2015-01-01', 'end_date' => '2015-12-31'))); + + $project = $p->getById(1); + $this->assertNotEmpty($project); + $this->assertEquals('2015-01-01', $project['start_date']); + $this->assertEquals('2015-12-31', $project['end_date']); + } + public function testCreationWithDefaultCategories() { $p = new Project($this->container); -- cgit v1.2.3