summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-11-02 16:14:31 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-11-02 19:37:01 +0100
commite2c755a4b5638c298c8cae27942681241f92fb7f (patch)
tree67642989d9d2b75f44ac8d773d13575ef647b62a
parentc047f32f25a9c1448bf78ef65d5144f5b882b719 (diff)
downloadnextcloud-server-e2c755a4b5638c298c8cae27942681241f92fb7f.tar.gz
nextcloud-server-e2c755a4b5638c298c8cae27942681241f92fb7f.zip
Fix asserts silently not executed
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 <danxuliu@gmail.com>
-rw-r--r--core/js/tests/specs/files/clientSpec.js10
1 files 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);
});
});
});