summaryrefslogtreecommitdiff
path: root/tests/integration/UserTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-06-26 10:25:13 -0400
committerFrederic Guillot <fred@kanboard.net>2016-06-26 10:25:13 -0400
commit4a230d331ec220fc32a48525afb308af0d9787fa (patch)
tree514aa3d703155b7f97a2c77147c9fd74cef60f84 /tests/integration/UserTest.php
parent922e0fb6de06a98774418612e0b0f75af72b6dbb (diff)
Added application and project roles validation for API procedure calls
Diffstat (limited to 'tests/integration/UserTest.php')
-rw-r--r--tests/integration/UserTest.php63
1 files changed, 0 insertions, 63 deletions
diff --git a/tests/integration/UserTest.php b/tests/integration/UserTest.php
deleted file mode 100644
index c407c918..00000000
--- a/tests/integration/UserTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-require_once __DIR__.'/BaseIntegrationTest.php';
-
-class UserTest extends BaseIntegrationTest
-{
- public function testAll()
- {
- $this->assertCreateUser();
- $this->assertGetUserById();
- $this->assertGetUserByName();
- $this->assertGetAllUsers();
- $this->assertEnableDisableUser();
- $this->assertUpdateUser();
- $this->assertRemoveUser();
- }
-
- public function assertGetUserById()
- {
- $user = $this->app->getUser($this->userId);
- $this->assertNotNull($user);
- $this->assertEquals($this->username, $user['username']);
- }
-
- public function assertGetUserByName()
- {
- $user = $this->app->getUserByName($this->username);
- $this->assertNotNull($user);
- $this->assertEquals($this->username, $user['username']);
- }
-
- public function assertGetAllUsers()
- {
- $users = $this->app->getAllUsers();
- $this->assertInternalType('array', $users);
- $this->assertNotEmpty($users);
- }
-
- public function assertEnableDisableUser()
- {
- $this->assertTrue($this->app->disableUser($this->userId));
- $this->assertFalse($this->app->isActiveUser($this->userId));
- $this->assertTrue($this->app->enableUser($this->userId));
- $this->assertTrue($this->app->isActiveUser($this->userId));
- }
-
- public function assertUpdateUser()
- {
- $this->assertTrue($this->app->updateUser(array(
- 'id' => $this->userId,
- 'name' => 'My user',
- )));
-
- $user = $this->app->getUser($this->userId);
- $this->assertNotNull($user);
- $this->assertEquals('My user', $user['name']);
- }
-
- public function assertRemoveUser()
- {
- $this->assertTrue($this->app->removeUser($this->userId));
- }
-}