summaryrefslogtreecommitdiffstats
path: root/core/js/tests
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-04-09 15:23:09 +0200
committerVincent Petry <pvince81@owncloud.com>2014-04-09 15:23:09 +0200
commitf84d66a24ffbdba66d8b1d8bc034431e31d8fe8d (patch)
tree9ef625199f92dc6e5b4fc870567ba74554da9ecc /core/js/tests
parentd8f56e3c00e9cdba37b1155a4314398c7a124103 (diff)
downloadnextcloud-server-f84d66a24ffbdba66d8b1d8bc034431e31d8fe8d.tar.gz
nextcloud-server-f84d66a24ffbdba66d8b1d8bc034431e31d8fe8d.zip
Moved SVGSupport call to use OC.Util.SVGSupport()
Diffstat (limited to 'core/js/tests')
-rw-r--r--core/js/tests/specs/coreSpec.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js
index 89056807788..ccd9f7a1288 100644
--- a/core/js/tests/specs/coreSpec.js
+++ b/core/js/tests/specs/coreSpec.js
@@ -147,19 +147,19 @@ describe('Core base tests', function() {
});
describe('Images', function() {
it('Generates image path with given extension', function() {
- var svgSupportStub = sinon.stub(window, 'SVGSupport', function() { return true; });
+ var svgSupportStub = sinon.stub(OC.Util, 'hasSVGSupport', function() { return true; });
expect(OC.imagePath('core', 'somefile.jpg')).toEqual(OC.webroot + '/core/img/somefile.jpg');
expect(OC.imagePath(TESTAPP, 'somefile.jpg')).toEqual(TESTAPP_ROOT + '/img/somefile.jpg');
svgSupportStub.restore();
});
it('Generates image path with svg extension when svg support exists', function() {
- var svgSupportStub = sinon.stub(window, 'SVGSupport', function() { return true; });
+ var svgSupportStub = sinon.stub(OC.Util, 'hasSVGSupport', function() { return true; });
expect(OC.imagePath('core', 'somefile')).toEqual(OC.webroot + '/core/img/somefile.svg');
expect(OC.imagePath(TESTAPP, 'somefile')).toEqual(TESTAPP_ROOT + '/img/somefile.svg');
svgSupportStub.restore();
});
it('Generates image path with png ext when svg support is not available', function() {
- var svgSupportStub = sinon.stub(window, 'SVGSupport', function() { return false; });
+ var svgSupportStub = sinon.stub(OC.Util, 'hasSVGSupport', function() { return false; });
expect(OC.imagePath('core', 'somefile')).toEqual(OC.webroot + '/core/img/somefile.png');
expect(OC.imagePath(TESTAPP, 'somefile')).toEqual(TESTAPP_ROOT + '/img/somefile.png');
svgSupportStub.restore();