From e2c755a4b5638c298c8cae27942681241f92fb7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 2 Nov 2017 16:14:31 +0100 Subject: [PATCH] Fix asserts silently not executed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first parameter of "apply" must be the object to act as "this", and the Promise callback gets the parameters provided in the "resolve". Signed-off-by: Daniel Calviño Sánchez --- core/js/tests/specs/files/clientSpec.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/js/tests/specs/files/clientSpec.js b/core/js/tests/specs/files/clientSpec.js index f75998029a9..ec0e15fd7b3 100644 --- a/core/js/tests/specs/files/clientSpec.js +++ b/core/js/tests/specs/files/clientSpec.js @@ -640,14 +640,14 @@ describe('OC.Files.Client tests', function() { function testPermission(permission, isFile, expectedPermissions) { var promise = getFileInfoWithPermission(permission, isFile); - promise.then(function(result) { + promise.then(function(status, result) { expect(result.permissions).toEqual(expectedPermissions); }); } function testMountType(permission, isFile, expectedMountType) { var promise = getFileInfoWithPermission(permission, isFile); - promise.then(function(result) { + promise.then(function(status, result) { expect(result.mountType).toEqual(expectedMountType); }); } @@ -664,7 +664,7 @@ describe('OC.Files.Client tests', function() { ['CKWDR', true, OC.PERMISSION_ALL] ]; _.each(testCases, function(testCase) { - return testPermission.apply(testCase); + return testPermission.apply(this, testCase); }); }); it('properly parses folder permissions', function() { @@ -679,7 +679,7 @@ describe('OC.Files.Client tests', function() { ]; _.each(testCases, function(testCase) { - return testPermission.apply(testCase); + return testPermission.apply(this, testCase); }); }); it('properly parses mount types', function() { @@ -691,7 +691,7 @@ describe('OC.Files.Client tests', function() { ]; _.each(testCases, function(testCase) { - return testMountType.apply(testCase); + return testMountType.apply(this, testCase); }); }); });