summaryrefslogtreecommitdiff
path: root/tests/functionals/ApiTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functionals/ApiTest.php')
-rw-r--r--tests/functionals/ApiTest.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/functionals/ApiTest.php b/tests/functionals/ApiTest.php
index da6b62f5..a9196121 100644
--- a/tests/functionals/ApiTest.php
+++ b/tests/functionals/ApiTest.php
@@ -80,6 +80,21 @@ class Api extends PHPUnit_Framework_TestCase
$this->assertEquals(1, $project['id']);
}
+ public function testGetProjectByName()
+ {
+ $project = $this->client->getProjectByName('API test');
+ $this->assertNotEmpty($project);
+ $this->assertEquals(1, $project['id']);
+
+ $project = $this->client->getProjectByName(array('name' => 'API test'));
+ $this->assertNotEmpty($project);
+ $this->assertEquals(1, $project['id']);
+
+ $project = $this->client->getProjectByName('None');
+ $this->assertEmpty($project);
+ $this->assertNull($project);
+ }
+
public function testUpdateProject()
{
$project = $this->client->getProjectById(1);