diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-09 13:08:50 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-09 13:08:50 +0200 |
commit | e3c99a8505da671f7721d5058ecc6ca296e87003 (patch) | |
tree | 02303bb1ead5d7d2388aee3c931b9ce6a86dbe64 /core/js | |
parent | cabd70148f4b78d580712364a3bee00c35e60bba (diff) | |
download | nextcloud-server-e3c99a8505da671f7721d5058ecc6ca296e87003.tar.gz nextcloud-server-e3c99a8505da671f7721d5058ecc6ca296e87003.zip |
Add beforeeach and aftereach
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/tests/specs/coreSpec.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js index 2ad1eb7623b..5db79ef2c56 100644 --- a/core/js/tests/specs/coreSpec.js +++ b/core/js/tests/specs/coreSpec.js @@ -135,19 +135,21 @@ describe('Core base tests', function() { }); }); describe('filePath', function() { - it('Uses a direct link for css and images,' , function() { + beforeEach(function() { OC.webroot = 'http://localhost'; OC.appswebroots['files'] = OC.webroot + '/apps3/files'; + }); + afterEach(function() { + delete OC.appswebroots['files']; + }); + it('Uses a direct link for css and images,' , function() { expect(OC.filePath('core', 'css', 'style.css')).toEqual('http://localhost/core/css/style.css'); expect(OC.filePath('files', 'css', 'style.css')).toEqual('http://localhost/apps3/files/css/style.css'); expect(OC.filePath('core', 'img', 'image.png')).toEqual('http://localhost/core/img/image.png'); expect(OC.filePath('files', 'img', 'image.png')).toEqual('http://localhost/apps3/files/img/image.png'); }); it('Routes PHP files via index.php,' , function() { - OC.webroot = 'http://localhost'; - OC.appswebroots['files'] = OC.webroot + '/apps3/files'; - expect(OC.filePath('core', 'ajax', 'test.php')).toEqual('http://localhost/index.php/core/ajax/test.php'); expect(OC.filePath('files', 'ajax', 'test.php')).toEqual('http://localhost/index.php/apps/files/ajax/test.php'); }); |