diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-09 13:08:50 +0200 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2014-10-09 18:04:56 +0300 |
commit | f8675f60e8a77363025641301a8dfda09a37972c (patch) | |
tree | d2bac94e0a37ad10d91fcc07d2a00fb962d7c50a /core | |
parent | 335ad56ff87d8fbc56d1f7f4524f73032ded9494 (diff) | |
download | nextcloud-server-f8675f60e8a77363025641301a8dfda09a37972c.tar.gz nextcloud-server-f8675f60e8a77363025641301a8dfda09a37972c.zip |
Add beforeeach and aftereach
Diffstat (limited to 'core')
-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 984ecd428d7..e828e4edb8e 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'); }); |