Ghost/ghost/admin/fixtures/init.js
Manuel Mitasch 275f623278 Amend fixtures & put body classes in styleBody mixin
- Change fixture response of posts route to actual format.
- Extracted classNames logic of routes into style-body mixin.
- Additionally replaced all double-quotes with single-quotes for style conformance.
2014-03-09 15:30:54 +00:00

32 lines
730 B
JavaScript

/*global ic */
import postFixtures from 'ghost/fixtures/posts';
var post = function (id) {
return {
response: postFixtures.findBy('id', id),
jqXHR: {},
textStatus: 'success'
};
};
var posts = function () {
return {
response: {
'posts': postFixtures,
'page': 1,
'limit': 15,
'pages': 1,
'total': 2
},
jqXHR: {},
textStatus: 'success'
};
};
var defineFixtures = function () {
ic.ajax.defineFixture('/ghost/api/v0.1/posts', posts());
ic.ajax.defineFixture('/ghost/api/v0.1/posts/1', post(1));
ic.ajax.defineFixture('/ghost/api/v0.1/posts/2', post(2));
};
export default defineFixtures;