summaryrefslogtreecommitdiffstats
path: root/core/js/tests
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/tests')
-rw-r--r--core/js/tests/specs/coreSpec.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js
index 7a09f362ee5..3ebe55305f7 100644
--- a/core/js/tests/specs/coreSpec.js
+++ b/core/js/tests/specs/coreSpec.js
@@ -147,11 +147,15 @@ describe('Core base tests', function() {
});
it('keeps leading slashes', function() {
expect(OC.joinPaths('/abc')).toEqual('/abc');
+ expect(OC.joinPaths('/abc', '')).toEqual('/abc');
+ expect(OC.joinPaths('', '/abc')).toEqual('/abc');
expect(OC.joinPaths('/abc', 'def')).toEqual('/abc/def');
expect(OC.joinPaths('/abc', 'def', 'ghi')).toEqual('/abc/def/ghi');
});
it('keeps trailing slashes', function() {
+ expect(OC.joinPaths('', 'abc/')).toEqual('abc/');
expect(OC.joinPaths('abc/')).toEqual('abc/');
+ expect(OC.joinPaths('abc/', '')).toEqual('abc/');
expect(OC.joinPaths('abc', 'def/')).toEqual('abc/def/');
expect(OC.joinPaths('abc', 'def', 'ghi/')).toEqual('abc/def/ghi/');
});