Remove ajax stubbing from post-stream tests

This commit is contained in:
Robin Ward
2015-12-01 16:04:13 -05:00
parent 80cf661075
commit 949f51ffe0
3 changed files with 20 additions and 33 deletions

View File

@ -153,6 +153,16 @@ export default function() {
slug: request.params.slug } });
});
this.get('/t/:topic_id/posts.json', request => {
const postIds = request.queryParams.post_ids;
const posts = postIds.map(p => ({id: parseInt(p), post_number: parseInt(p) }));
return response(200, { post_stream: { posts } });
});
this.get('/posts/:post_id/reply-history.json', () => {
return response(200, [ { id: 2222, post_number: 2222 } ]);
});
this.post('/posts', function(request) {
const data = parsePostData(request.requestBody);