2014-03-02 15:12:06 -05:00
|
|
|
/*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 {
|
2014-03-03 21:18:10 +01:00
|
|
|
response: {
|
|
|
|
'posts': postFixtures,
|
|
|
|
'page': 1,
|
|
|
|
'limit': 15,
|
|
|
|
'pages': 1,
|
|
|
|
'total': 2
|
|
|
|
},
|
2014-03-02 15:12:06 -05:00
|
|
|
jqXHR: {},
|
|
|
|
textStatus: 'success'
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-03-03 21:18:10 +01:00
|
|
|
var defineFixtures = function () {
|
2014-03-02 15:12:06 -05:00
|
|
|
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));
|
2014-03-03 21:18:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
export default defineFixtures;
|