Tests vars-on-top

This commit is contained in:
Amine Ben hammou
2017-09-27 15:10:51 +00:00
parent 4e2e9f6f8f
commit 9b41641e97
17 changed files with 88 additions and 51 deletions

View File

@@ -74,6 +74,7 @@ define([
});
it('uses defaults from config when they are set', function () {
var model;
global.stubConfig(EditorApplication, {
blockDefaults: {
image: {
@@ -91,7 +92,7 @@ define([
}
}
});
var model = new (ImageBlock.ImageBlockModel)();
model = new (ImageBlock.ImageBlockModel)();
expect(model.get('link')).to.equal('http://example.org/customConfigPage');
expect(model.get('src')).to.equal('http://example.org/someCustomConfigImage.png');
@@ -104,11 +105,12 @@ define([
});
describe('block view', function () {
var model;
var view;
global.stubChannel(EditorApplication);
global.stubConfig(EditorApplication);
global.stubAvailableStyles(EditorApplication);
var model = new (ImageBlock.ImageBlockModel)();
var view;
model = new (ImageBlock.ImageBlockModel)();
beforeEach(function () {
view = new (ImageBlock.ImageBlockView)({model: model});