diff options
author | Hendrik Leppelsack <hendrik@leppelsack.de> | 2016-06-29 15:14:34 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-07-01 16:36:37 +0200 |
commit | 5cc01476e4c9b0803bcac0bcb065eae4b086b025 (patch) | |
tree | d6087381526a3dbc7f49e8f28b60f330aa179114 | |
parent | 0a8f7bdc5bbc351a5d075001835a76a48cd563fc (diff) | |
download | nextcloud-server-5cc01476e4c9b0803bcac0bcb065eae4b086b025.tar.gz nextcloud-server-5cc01476e4c9b0803bcac0bcb065eae4b086b025.zip |
adjusts tests to removal of svg fallback
-rw-r--r-- | core/js/tests/specs/coreSpec.js | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js index 3d19a38c416..1ffe7b38a40 100644 --- a/core/js/tests/specs/coreSpec.js +++ b/core/js/tests/specs/coreSpec.js @@ -231,22 +231,12 @@ describe('Core base tests', function() { }); describe('Images', function() { it('Generates image path with given extension', function() { - 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(OC.Util, 'hasSVGSupport', function() { return true; }); + it('Generates image path with svg extension', function() { 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(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(); }); }); }); @@ -504,32 +494,6 @@ describe('Core base tests', function() { expect($navigation.is(':visible')).toEqual(false); }); }); - describe('SVG extension replacement', function() { - var svgSupportStub; - - beforeEach(function() { - svgSupportStub = sinon.stub(OC.Util, 'hasSVGSupport'); - }); - afterEach(function() { - svgSupportStub.restore(); - }); - it('does not replace svg extension with png when SVG is supported', function() { - svgSupportStub.returns(true); - expect( - OC.Util.replaceSVGIcon('/path/to/myicon.svg?someargs=1') - ).toEqual( - '/path/to/myicon.svg?someargs=1' - ); - }); - it('replaces svg extension with png when SVG not supported', function() { - svgSupportStub.returns(false); - expect( - OC.Util.replaceSVGIcon('/path/to/myicon.svg?someargs=1') - ).toEqual( - '/path/to/myicon.png?someargs=1' - ); - }); - }); describe('Util', function() { describe('humanFileSize', function() { it('renders file sizes with the correct unit', function() { @@ -1017,4 +981,3 @@ describe('Core base tests', function() { }); }); }); - |