From b7f20c0f36dd6e0ed65ca93fcec44aa23f2fa203 Mon Sep 17 00:00:00 2001 From: Daniel Schaal Date: Tue, 6 Jun 2017 18:20:20 +0200 Subject: Fix travis build (#178) * Use stable12 branch for travis * Shorten db indices to max 27 characters to satisfy app:check-code * Use precise container, downgrade to psql 9.4 * Create psql role * Fix ContentController test * Fix PageController and StatusService tests * Use OCP\IDBConnection, OCP\IDb was removed * Extend IntegrationTest from \Test\Testcase, use loginAsUser to login * Require phpunit 5, nextcloud tests not compatible with phpunit 6 Change tests to use phpunit from vendor directory --- js/tests/unit/controller/ContentControllerSpec.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'js/tests/unit/controller/ContentControllerSpec.js') diff --git a/js/tests/unit/controller/ContentControllerSpec.js b/js/tests/unit/controller/ContentControllerSpec.js index c978238de..dbee79f44 100644 --- a/js/tests/unit/controller/ContentControllerSpec.js +++ b/js/tests/unit/controller/ContentControllerSpec.js @@ -402,13 +402,15 @@ describe('ContentController', function () { })); - it ('should toggle active item', function ($controller) { - var ctrl = $controller('ContentController'); - expect(ctrl.isItemActive(3)).toBe(undefined); + it ('should toggle active item', inject(function ($controller) { + var ctrl = $controller('ContentController', { + data: {'items': [{id: 3}, {id: 4}]} + }); + expect(ctrl.isItemActive(3)).toBe(false); ctrl.setItemActive(3); expect(ctrl.isItemActive(4)).toBe(false); expect(ctrl.isItemActive(3)).toBe(true); - }); + })); it('should autopage if more than 0 elements', inject(function ($controller, ItemResource, Publisher) { -- cgit v1.2.3