summaryrefslogtreecommitdiff
path: root/tests/functionals/ApiTest.php
diff options
context:
space:
mode:
authorBusfreak <martin@middeke.de>2015-12-15 12:00:47 +0100
committerBusfreak <martin@middeke.de>2015-12-15 12:00:47 +0100
commit16e8241f0f29f0afb9c4ad4c6f68699d62d889ff (patch)
treeaa0f03c5c1d7897246e513e52c6a1f823709dd3d /tests/functionals/ApiTest.php
parentb834f5475c8eebb76548046558e7d1464cbd01d4 (diff)
parent9e1f4fa6c7eae1b46cf5431ab085b82e970e2d57 (diff)
Merge remote-tracking branch 'refs/remotes/origin/master'
Diffstat (limited to 'tests/functionals/ApiTest.php')
-rw-r--r--tests/functionals/ApiTest.php38
1 files changed, 29 insertions, 9 deletions
diff --git a/tests/functionals/ApiTest.php b/tests/functionals/ApiTest.php
index 9be22023..fbb703c9 100644
--- a/tests/functionals/ApiTest.php
+++ b/tests/functionals/ApiTest.php
@@ -366,6 +366,33 @@ class Api extends PHPUnit_Framework_TestCase
$this->assertEquals('Swimlane A', $swimlanes[2]['name']);
}
+ public function testCreateTaskWithWrongMember()
+ {
+ $task = array(
+ 'title' => 'Task #1',
+ 'color_id' => 'blue',
+ 'owner_id' => 1,
+ 'project_id' => 1,
+ 'column_id' => 2,
+ );
+
+ $task_id = $this->client->createTask($task);
+
+ $this->assertFalse($task_id);
+ }
+
+ public function testGetAllowedUsers()
+ {
+ $users = $this->client->getMembers(1);
+ $this->assertNotFalse($users);
+ $this->assertEquals(array(), $users);
+ }
+
+ public function testAddMember()
+ {
+ $this->assertTrue($this->client->allowUser(1, 1));
+ }
+
public function testCreateTask()
{
$task = array(
@@ -573,20 +600,13 @@ class Api extends PHPUnit_Framework_TestCase
$this->assertEquals('titi@localhost', $user['email']);
}
- public function testGetAllowedUsers()
- {
- $users = $this->client->getMembers(1);
- $this->assertNotFalse($users);
- $this->assertEquals(array(), $users);
- }
-
public function testAllowedUser()
{
$this->assertTrue($this->client->allowUser(1, 2));
$users = $this->client->getMembers(1);
$this->assertNotFalse($users);
- $this->assertEquals(array(2 => 'Titi'), $users);
+ $this->assertEquals(array(1 => 'admin', 2 => 'Titi'), $users);
}
public function testRevokeUser()
@@ -595,7 +615,7 @@ class Api extends PHPUnit_Framework_TestCase
$users = $this->client->getMembers(1);
$this->assertNotFalse($users);
- $this->assertEquals(array(), $users);
+ $this->assertEquals(array(1 => 'admin'), $users);
}
public function testCreateComment()