diff options
Diffstat (limited to 'tests/units/Model')
-rw-r--r-- | tests/units/Model/ProjectMetadataTest.php | 5 | ||||
-rw-r--r-- | tests/units/Model/TaskMetadataTest.php | 5 | ||||
-rw-r--r-- | tests/units/Model/UserMetadataTest.php | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/units/Model/ProjectMetadataTest.php b/tests/units/Model/ProjectMetadataTest.php index 43d66b7b..5814987d 100644 --- a/tests/units/Model/ProjectMetadataTest.php +++ b/tests/units/Model/ProjectMetadataTest.php @@ -30,6 +30,11 @@ class ProjectMetadataTest extends Base $this->assertEquals(array('key1' => 'value2'), $pm->getAll(1)); $this->assertEquals(array('key1' => 'value1', 'key2' => 'value2'), $pm->getAll(2)); + + $this->assertTrue($pm->remove(2, 'key1')); + $this->assertFalse($pm->remove(2, 'key1')); + + $this->assertEquals(array('key2' => 'value2'), $pm->getAll(2)); } public function testAutomaticRemove() diff --git a/tests/units/Model/TaskMetadataTest.php b/tests/units/Model/TaskMetadataTest.php index 9ce7d6be..2683c297 100644 --- a/tests/units/Model/TaskMetadataTest.php +++ b/tests/units/Model/TaskMetadataTest.php @@ -33,5 +33,10 @@ class TaskMetadataTest extends Base $this->assertEquals(array('key1' => 'value2'), $tm->getAll(1)); $this->assertEquals(array('key1' => 'value1', 'key2' => 'value2'), $tm->getAll(2)); + + $this->assertTrue($tm->remove(2, 'key1')); + $this->assertFalse($tm->remove(2, 'key1')); + + $this->assertEquals(array('key2' => 'value2'), $tm->getAll(2)); } } diff --git a/tests/units/Model/UserMetadataTest.php b/tests/units/Model/UserMetadataTest.php index cc1fff12..457f1fb2 100644 --- a/tests/units/Model/UserMetadataTest.php +++ b/tests/units/Model/UserMetadataTest.php @@ -29,5 +29,10 @@ class UserMetadataTest extends Base $this->assertEquals(array('key1' => 'value2'), $m->getAll(1)); $this->assertEquals(array('key1' => 'value1', 'key2' => 'value2'), $m->getAll(2)); + + $this->assertTrue($m->remove(2, 'key1')); + $this->assertFalse($m->remove(2, 'key1')); + + $this->assertEquals(array('key2' => 'value2'), $m->getAll(2)); } } |