Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2017-05-29 00:16:35 +02:00
Родитель 19a90809f9
Коммит 4623688852
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4C614C6ED2CDE6DF
6 изменённых файлов: 36 добавлений и 23 удалений

Просмотреть файл

@ -67,7 +67,7 @@ pipeline:
matrix:
TESTS: syntax-php7.0
php5.6:
image: nextcloudci/php5.6:php5.6-3
image: nextcloudci/php5.6:php5.6-7
environment:
- APP_NAME=deck
- CORE_BRANCH=master
@ -93,7 +93,7 @@ pipeline:
matrix:
TESTS: php5.6
php7.0:
image: nextcloudci/php7.0:php7.0-7
image: nextcloudci/php7.0:php7.0-8
environment:
- APP_NAME=deck
- CORE_BRANCH=master

Просмотреть файл

@ -33,12 +33,12 @@ app.config(function ($provide, $routeProvider, $interpolateProvider, $httpProvid
});
markdownItConverterProvider.use(markdownitLinkTarget);
$urlRouterProvider.otherwise("/");
$urlRouterProvider.otherwise('/');
$stateProvider
.state('list', {
url: "/:filter",
templateUrl: "/boardlist.mainView.html",
url: '/:filter',
templateUrl: '/boardlist.mainView.html',
controller: 'ListController',
reloadOnSearch: false,
params: {
@ -46,27 +46,27 @@ app.config(function ($provide, $routeProvider, $interpolateProvider, $httpProvid
}
})
.state('board', {
url: "/board/:boardId/:filter",
templateUrl: "/board.html",
url: '/board/:boardId/:filter',
templateUrl: '/board.html',
controller: 'BoardController',
params: {
filter: { value: '', dynamic: true }
}
})
.state('board.detail', {
url: "/detail/",
url: '/detail/',
reloadOnSearch : false,
views: {
"sidebarView": {
templateUrl: "/board.sidebarView.html"
'sidebarView': {
templateUrl: '/board.sidebarView.html'
}
}
})
.state('board.card', {
url: "/card/:cardId",
url: '/card/:cardId',
views: {
"sidebarView": {
templateUrl: "/card.sidebarView.html",
'sidebarView': {
templateUrl: '/card.sidebarView.html',
controller: 'CardController'
}
}

Просмотреть файл

@ -1,4 +1,3 @@
/*
* @copyright Copyright (c) 2016 Julius Härtl <jus@bitgrid.net>
*
@ -21,6 +20,8 @@
*
*/
/* global app angular */
app.controller('ListController', function ($scope, $location, $filter, BoardService, $element, $timeout, $stateParams, $state) {
$scope.boards = [];
$scope.newBoard = {};
@ -126,7 +127,7 @@ app.controller('ListController', function ($scope, $location, $filter, BoardServ
$scope.boardDeleteUndo = function (board) {
BoardService.deleteUndo(board.id).then(function (data) {
$scope.filterData();
})
});
};
});

Просмотреть файл

@ -24,7 +24,7 @@
/**
* @group DB
*/
class BoardDatabaseTest extends \PHPUnit_Framework_TestCase
class BoardDatabaseTest extends \Test\TestCase
{
const TEST_USER1 = "test-share-user1";
const TEST_USER2 = "test-share-user2";
@ -61,6 +61,7 @@ class BoardDatabaseTest extends \PHPUnit_Framework_TestCase
\OC::$server->getGroupManager()->addBackend($groupBackend);
}
public function setUp() {
parent::setUp();
\OC::$server->getUserSession()->login(self::TEST_USER1, self::TEST_USER1);
$this->boardService = \OC::$server->query("\OCA\Deck\Service\BoardService");
}
@ -80,5 +81,6 @@ class BoardDatabaseTest extends \PHPUnit_Framework_TestCase
}
public function tearDown() {
parent::tearDown();
}
}

Просмотреть файл

@ -107,7 +107,10 @@ class BoardMapperTest extends MapperTestUtility {
public function testFind() {
$actual = $this->boardMapper->find($this->boards[0]->getId());
$expected = $this->boards[0];
/** @var Board $expected */
$expected = clone $this->boards[0];
$expected->setShared(-1);
$expected->resetUpdatedFields();
$this->assertEquals($expected, $actual);
}
@ -129,9 +132,9 @@ class BoardMapperTest extends MapperTestUtility {
public function testFindAll() {
$actual = $this->boardMapper->findAll();
$this->assertAttributeEquals($this->boards[0]->getId(), 'id', $actual[0]);
$this->assertAttributeEquals($this->boards[1]->getId(), 'id', $actual[1]);
$this->assertAttributeEquals($this->boards[2]->getId(), 'id', $actual[2]);
$this->assertEquals($this->boards[0]->getId(), $actual[0]->getId());
$this->assertEquals($this->boards[1]->getId(), $actual[1]->getId());
$this->assertEquals($this->boards[2]->getId(), $actual[2]->getId());
}
public function testFindAllToDelete() {
@ -148,8 +151,9 @@ class BoardMapperTest extends MapperTestUtility {
public function testFindWithLabels() {
$actual = $this->boardMapper->find($this->boards[0]->getId(), true, false);
$expected = $this->boards[0];
$this->assertEquals($expected, $actual);
/** @var Board $expected */
$expected = $this->boards[0];
$this->assertEquals($expected->getLabels(), $actual->getLabels());
}
public function testFindWithAcl() {

Просмотреть файл

@ -31,8 +31,14 @@ use OCA\Deck\Db\Label;
use OCA\Deck\Db\LabelMapper;
use OCA\Deck\Db\Stack;
use OCA\Deck\Db\StackMapper;
use Test\TestCase;
use \Test\TestCase;
/**
* Class StackServiceTest
*
* @package OCA\Deck\Service
* @group DB
*/
class StackServiceTest extends TestCase {
/** @var StackService */