Tests vars-on-top
This commit is contained in:
@@ -23,6 +23,7 @@ define([
|
||||
});
|
||||
|
||||
it('uses defaults from config when they are set', function () {
|
||||
var model;
|
||||
global.stubConfig(EditorApplication, {
|
||||
blockDefaults: {
|
||||
text: {
|
||||
@@ -30,16 +31,18 @@ define([
|
||||
}
|
||||
}
|
||||
});
|
||||
var model = new (TextBlock.TextBlockModel)();
|
||||
model = new (TextBlock.TextBlockModel)();
|
||||
|
||||
expect(model.get('text')).to.equal('some custom config text');
|
||||
});
|
||||
});
|
||||
|
||||
describe('block view', function () {
|
||||
var model;
|
||||
var view;
|
||||
global.stubConfig(EditorApplication);
|
||||
var model = new (TextBlock.TextBlockModel)();
|
||||
var view = new (TextBlock.TextBlockView)({model: model});
|
||||
model = new (TextBlock.TextBlockModel)();
|
||||
view = new (TextBlock.TextBlockView)({model: model});
|
||||
|
||||
it('renders', function () {
|
||||
expect(view.render).to.not.throw();
|
||||
|
Reference in New Issue
Block a user