Stub wordpress calls and fix tests for ALC and Posts

This commit is contained in:
Tautvidas Sipavičius
2015-09-04 16:01:42 +03:00
parent bfc6c83d00
commit 9c6955c8cf
5 changed files with 53 additions and 0 deletions

View File

@ -219,6 +219,31 @@ define('test/newsletter_editor/blocks/posts', [
var model, view;
before(function () {
EditorApplication.module('components.wordpress').getPostTypes = function() {
var deferred = jQuery.Deferred();
deferred.resolve([
{
name: 'post',
labels: {
singular_name: 'Post',
},
},
{
name: 'page',
labels: {
singular_name: 'Page',
},
},
{
name: 'mailpoet_page',
labels: {
singular_name: 'Mailpoet page',
},
},
]);
return deferred;
};
global.stubChannel(EditorApplication);
global.stubConfig(EditorApplication, {
blockDefaults: {},