0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00

Fixed broken payload in posts_spec.js

no issue

- the affected test had a wrong payload, but passed anyway because the previous test edited the same title ;)
- this routing test does currently truncate the tables after each test case
  - the test can run faster
  - if we achieve reducing the routing tests, we can reconsider truncating the db
This commit is contained in:
kirrg001 2018-01-25 00:55:39 +01:00
parent 80a1128016
commit 20d1f86fb6

View file

@ -1044,10 +1044,11 @@ describe('Post API', function () {
}
var jsonResponse = res.body,
changedValue = 'My new Title';
changedValue = 'A title.';
should.exist(jsonResponse);
jsonResponse.title = changedValue;
jsonResponse.published_at = null;
jsonResponse.posts[0].title = changedValue;
jsonResponse.posts[0].published_at = null;
request.put(testUtils.API.getApiQuery('posts/' + testUtils.DataGenerator.Content.posts[0].id + '/'))
.set('Authorization', 'Bearer ' + ownerAccessToken)