Sha256: a4c5765a480dea1174a5d2551b31a457e15adf71d0564699564c68d01cae3902
Contents?: true
Size: 1.11 KB
Versions: 5
Compression:
Stored size: 1.11 KB
Contents
describe('CustomCss', function () { var CustomCss = webfont.CustomCss; describe('insert links correctly', function () { var fakeDomHelper = null, load = null; beforeEach(function () { fakeDomHelper = { createCssLink: jasmine.createSpy('createCssLink'), insertInto: jasmine.createSpy('insertInto') }; load = jasmine.createSpy('load'); var defaultModule = new CustomCss(fakeDomHelper, { families: ['Font1', 'Font2', 'Font3'], urls: ['http://moo', 'http://meuh'] }); defaultModule.load(load); }); it('should have inserted the links correctly', function () { expect(fakeDomHelper.createCssLink.callCount).toEqual(2); expect(fakeDomHelper.createCssLink).toHaveBeenCalledWith('http://moo'); expect(fakeDomHelper.createCssLink).toHaveBeenCalledWith('http://meuh'); }); it('should have loaded the families correctly', function () { expect(load.callCount).toEqual(1); expect(load.calls[0].args[0].length).toEqual(3); expect(load.calls[0].args[0]).toEqual(['Font1', 'Font2', 'Font3']); }); }); });
Version data entries
5 entries across 5 versions & 1 rubygems