spec/modules/custom_spec.js in webfontloader-1.4.9 vs spec/modules/custom_spec.js in webfontloader-1.4.10
- old
+ new
@@ -6,12 +6,11 @@
var fakeDomHelper = null,
load = null;
beforeEach(function () {
fakeDomHelper = {
- createCssLink: jasmine.createSpy('createCssLink'),
- insertInto: jasmine.createSpy('insertInto')
+ loadStylesheet: jasmine.createSpy('createCssLink')
};
load = jasmine.createSpy('load');
var defaultModule = new Custom(fakeDomHelper, {
@@ -21,12 +20,12 @@
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');
+ expect(fakeDomHelper.loadStylesheet.callCount).toEqual(2);
+ expect(fakeDomHelper.loadStylesheet).toHaveBeenCalledWith('http://moo');
+ expect(fakeDomHelper.loadStylesheet).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);