aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/tests/js/filesSpec.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-16 13:00:35 +0200
committerVincent Petry <pvince81@owncloud.com>2014-05-16 13:00:35 +0200
commit1fb0d5412c7a4a3b888098e492342699d05fe55e (patch)
tree436bab2e329cf0e3ff2080a4227338c131f85b57 /apps/files/tests/js/filesSpec.js
parent43d6650d194105dac30b11fb2ba4a3b3c7805650 (diff)
parent6fd084243b65a556d4775209ba3916145ef5912a (diff)
downloadnextcloud-server-1fb0d5412c7a4a3b888098e492342699d05fe55e.tar.gz
nextcloud-server-1fb0d5412c7a4a3b888098e492342699d05fe55e.zip
Merge pull request #6260 from owncloud/jan-navigation-filesidebar
Files app navigation sidebar
Diffstat (limited to 'apps/files/tests/js/filesSpec.js')
-rw-r--r--apps/files/tests/js/filesSpec.js17
1 files changed, 3 insertions, 14 deletions
diff --git a/apps/files/tests/js/filesSpec.js b/apps/files/tests/js/filesSpec.js
index 7f8848619f5..4f8d5a29318 100644
--- a/apps/files/tests/js/filesSpec.js
+++ b/apps/files/tests/js/filesSpec.js
@@ -19,8 +19,9 @@
*
*/
-/* global OC, Files */
-describe('Files tests', function() {
+describe('OCA.Files.Files tests', function() {
+ var Files = OCA.Files.Files;
+
describe('File name validation', function() {
it('Validates correct file names', function() {
var fileNames = [
@@ -83,18 +84,6 @@ describe('Files tests', function() {
});
});
describe('getDownloadUrl', function() {
- var curDirStub;
- beforeEach(function() {
- curDirStub = sinon.stub(FileList, 'getCurrentDirectory');
- });
- afterEach(function() {
- curDirStub.restore();
- });
- it('returns the ajax download URL when only filename specified', function() {
- curDirStub.returns('/subdir');
- var url = Files.getDownloadUrl('test file.txt');
- expect(url).toEqual(OC.webroot + '/index.php/apps/files/ajax/download.php?dir=%2Fsubdir&files=test%20file.txt');
- });
it('returns the ajax download URL when filename and dir specified', function() {
var url = Files.getDownloadUrl('test file.txt', '/subdir');
expect(url).toEqual(OC.webroot + '/index.php/apps/files/ajax/download.php?dir=%2Fsubdir&files=test%20file.txt');