Merge pull request #1126 from mailpoet/eslint3
Eslint rules [MAILPOET-1084]
This commit is contained in:
@@ -79,6 +79,7 @@ define([
|
||||
});
|
||||
|
||||
it('uses defaults from config when they are set', function () {
|
||||
var model;
|
||||
global.stubConfig(EditorApplication, {
|
||||
blockDefaults: {
|
||||
footer: {
|
||||
@@ -101,7 +102,7 @@ define([
|
||||
}
|
||||
}
|
||||
});
|
||||
var model = new (FooterBlock.FooterBlockModel)();
|
||||
model = new (FooterBlock.FooterBlockModel)();
|
||||
|
||||
expect(model.get('text')).to.equal('some custom config text');
|
||||
expect(model.get('styles.block.backgroundColor')).to.equal('#123456');
|
||||
@@ -116,11 +117,12 @@ define([
|
||||
});
|
||||
|
||||
describe('block view', function () {
|
||||
var model;
|
||||
var view;
|
||||
global.stubChannel(EditorApplication);
|
||||
global.stubConfig(EditorApplication);
|
||||
global.stubAvailableStyles(EditorApplication);
|
||||
var model = new (FooterBlock.FooterBlockModel)(),
|
||||
view;
|
||||
model = new (FooterBlock.FooterBlockModel)();
|
||||
|
||||
beforeEach(function () {
|
||||
global.stubChannel(EditorApplication);
|
||||
@@ -134,13 +136,15 @@ define([
|
||||
});
|
||||
|
||||
describe('settings view', function () {
|
||||
var model;
|
||||
var view;
|
||||
global.stubChannel(EditorApplication);
|
||||
global.stubAvailableStyles(EditorApplication, {
|
||||
fonts: ['Arial', 'Tahoma'],
|
||||
textSizes: ['16px', '20px']
|
||||
});
|
||||
var model = new (FooterBlock.FooterBlockModel)(),
|
||||
view = new (FooterBlock.FooterBlockSettingsView)({model: model});
|
||||
model = new (FooterBlock.FooterBlockModel)();
|
||||
view = new (FooterBlock.FooterBlockSettingsView)({model: model});
|
||||
|
||||
it('renders', function () {
|
||||
expect(view.render).to.not.throw();
|
||||
@@ -148,7 +152,8 @@ define([
|
||||
});
|
||||
|
||||
describe('once rendered', function () {
|
||||
var model, view;
|
||||
var model;
|
||||
var view;
|
||||
|
||||
beforeEach(function() {
|
||||
global.stubChannel(EditorApplication);
|
||||
|
Reference in New Issue
Block a user