Use regular groups endpoint to support Nextcloud 13

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-12-05 16:23:17 +01:00
parent 3162ff4261
commit 8906d12a47
4 changed files with 40 additions and 8 deletions

View File

@@ -65,6 +65,10 @@ class PageControllerTest extends \Test\TestCase {
->method('checkFirstRun')
->willReturn(true);
$this->permissionService->expects($this->any())
->method('canCreate')
->willReturn(true);
$this->defaultBoardService->expects($this->once())
->method('createDefaultBoard')
->willReturn($board);
@@ -73,6 +77,29 @@ class PageControllerTest extends \Test\TestCase {
$this->assertEquals('main', $response->getTemplateName());
}
public function testIndexOnFirstRunNoCreate() {
$board = new Board();
$board->setTitle('Personal');
$board->setOwner($this->userId);
$board->setColor('000000');
$this->defaultBoardService->expects($this->once())
->method('checkFirstRun')
->willReturn(true);
$this->permissionService->expects($this->any())
->method('canCreate')
->willReturn(false);
$this->defaultBoardService->expects($this->never())
->method('createDefaultBoard')
->willReturn($board);
$response = $this->controller->index();
$this->assertEquals('main', $response->getTemplateName());
}
public function testIndexOnSecondRun() {
$this->config->setUserValue($this->userId, 'deck', 'firstRun', 'no');