diff options
| author | Frederic Guillot <fred@kanboard.net> | 2016-06-26 10:25:13 -0400 |
|---|---|---|
| committer | Frederic Guillot <fred@kanboard.net> | 2016-06-26 10:25:13 -0400 |
| commit | 4a230d331ec220fc32a48525afb308af0d9787fa (patch) | |
| tree | 514aa3d703155b7f97a2c77147c9fd74cef60f84 /tests/integration/ColumnTest.php | |
| parent | 922e0fb6de06a98774418612e0b0f75af72b6dbb (diff) | |
Added application and project roles validation for API procedure calls
Diffstat (limited to 'tests/integration/ColumnTest.php')
| -rw-r--r-- | tests/integration/ColumnTest.php | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/tests/integration/ColumnTest.php b/tests/integration/ColumnTest.php deleted file mode 100644 index 5a81badc..00000000 --- a/tests/integration/ColumnTest.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -require_once __DIR__.'/BaseIntegrationTest.php'; - -class ColumnTest extends BaseIntegrationTest -{ - protected $projectName = 'My project to test columns'; - private $columns = array(); - - public function testAll() - { - $this->assertCreateTeamProject(); - $this->assertGetColumns(); - $this->assertUpdateColumn(); - $this->assertAddColumn(); - $this->assertRemoveColumn(); - $this->assertChangeColumnPosition(); - } - - public function assertGetColumns() - { - $this->columns = $this->app->getColumns($this->projectId); - $this->assertCount(4, $this->columns); - $this->assertEquals('Done', $this->columns[3]['title']); - } - - public function assertUpdateColumn() - { - $this->assertTrue($this->app->updateColumn($this->columns[3]['id'], 'Another column', 2)); - - $this->columns = $this->app->getColumns($this->projectId); - $this->assertEquals('Another column', $this->columns[3]['title']); - $this->assertEquals(2, $this->columns[3]['task_limit']); - } - - public function assertAddColumn() - { - $column_id = $this->app->addColumn($this->projectId, 'New column'); - $this->assertNotFalse($column_id); - $this->assertTrue($column_id > 0); - - $this->columns = $this->app->getColumns($this->projectId); - $this->assertCount(5, $this->columns); - $this->assertEquals('New column', $this->columns[4]['title']); - } - - public function assertRemoveColumn() - { - $this->assertTrue($this->app->removeColumn($this->columns[3]['id'])); - - $this->columns = $this->app->getColumns($this->projectId); - $this->assertCount(4, $this->columns); - } - - public function assertChangeColumnPosition() - { - $this->assertTrue($this->app->changeColumnPosition($this->projectId, $this->columns[0]['id'], 3)); - - $this->columns = $this->app->getColumns($this->projectId); - $this->assertEquals('Ready', $this->columns[0]['title']); - $this->assertEquals(1, $this->columns[0]['position']); - $this->assertEquals('Work in progress', $this->columns[1]['title']); - $this->assertEquals(2, $this->columns[1]['position']); - $this->assertEquals('Backlog', $this->columns[2]['title']); - $this->assertEquals(3, $this->columns[2]['position']); - $this->assertEquals('New column', $this->columns[3]['title']); - $this->assertEquals(4, $this->columns[3]['position']); - } -} |
