0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Update test-related dependencies

No Issue
- nock@0.52.4
- should@4.4.2
    .eql no longer does type coercion.
- sinon@1.12.2
- supertest@0.15.0
This commit is contained in:
Jason Williams 2015-01-01 18:56:18 +00:00
parent bd1211da5d
commit 9d82c2e360
2 changed files with 19 additions and 19 deletions

View file

@ -169,7 +169,7 @@ describe('Post API', function () {
jsonResponse.posts.should.exist; jsonResponse.posts.should.exist;
testUtils.API.checkResponse(jsonResponse.posts[0], 'post'); testUtils.API.checkResponse(jsonResponse.posts[0], 'post');
jsonResponse.posts[0].id.should.equal(1); jsonResponse.posts[0].id.should.equal(1);
jsonResponse.posts[0].page.should.eql(0); jsonResponse.posts[0].page.should.not.be.ok;
_.isBoolean(jsonResponse.posts[0].featured).should.eql(true); _.isBoolean(jsonResponse.posts[0].featured).should.eql(true);
_.isBoolean(jsonResponse.posts[0].page).should.eql(true); _.isBoolean(jsonResponse.posts[0].page).should.eql(true);
jsonResponse.posts[0].author.should.be.a.Number; jsonResponse.posts[0].author.should.be.a.Number;
@ -198,7 +198,7 @@ describe('Post API', function () {
jsonResponse.posts.should.exist; jsonResponse.posts.should.exist;
testUtils.API.checkResponse(jsonResponse.posts[0], 'post'); testUtils.API.checkResponse(jsonResponse.posts[0], 'post');
jsonResponse.posts[0].slug.should.equal('welcome-to-ghost'); jsonResponse.posts[0].slug.should.equal('welcome-to-ghost');
jsonResponse.posts[0].page.should.eql(0); jsonResponse.posts[0].page.should.not.be.ok;
_.isBoolean(jsonResponse.posts[0].featured).should.eql(true); _.isBoolean(jsonResponse.posts[0].featured).should.eql(true);
_.isBoolean(jsonResponse.posts[0].page).should.eql(true); _.isBoolean(jsonResponse.posts[0].page).should.eql(true);
jsonResponse.posts[0].author.should.be.a.Number; jsonResponse.posts[0].author.should.be.a.Number;
@ -225,7 +225,7 @@ describe('Post API', function () {
jsonResponse.should.exist; jsonResponse.should.exist;
jsonResponse.posts.should.exist; jsonResponse.posts.should.exist;
testUtils.API.checkResponse(jsonResponse.posts[0], 'post', 'tags'); testUtils.API.checkResponse(jsonResponse.posts[0], 'post', 'tags');
jsonResponse.posts[0].page.should.eql(0); jsonResponse.posts[0].page.should.not.be.ok;
jsonResponse.posts[0].author.should.be.an.Object; jsonResponse.posts[0].author.should.be.an.Object;
testUtils.API.checkResponse(jsonResponse.posts[0].author, 'user'); testUtils.API.checkResponse(jsonResponse.posts[0].author, 'user');
@ -251,7 +251,7 @@ describe('Post API', function () {
jsonResponse.should.exist; jsonResponse.should.exist;
jsonResponse.posts.should.exist; jsonResponse.posts.should.exist;
testUtils.API.checkResponse(jsonResponse.posts[0], 'post'); testUtils.API.checkResponse(jsonResponse.posts[0], 'post');
jsonResponse.posts[0].page.should.eql(true); jsonResponse.posts[0].page.should.be.ok;
_.isBoolean(jsonResponse.posts[0].page).should.eql(true); _.isBoolean(jsonResponse.posts[0].page).should.eql(true);
done(); done();
}); });
@ -557,11 +557,11 @@ describe('Post API', function () {
return done(err); return done(err);
} }
var jsonResponse = res.body, var jsonResponse = res.body;
changedValue = true;
jsonResponse.should.exist; jsonResponse.should.exist;
jsonResponse.posts[0].page.should.eql(0); jsonResponse.posts[0].page.should.not.be.ok;
jsonResponse.posts[0].page = changedValue; jsonResponse.posts[0].page = true;
request.put(testUtils.API.getApiQuery('posts/1/')) request.put(testUtils.API.getApiQuery('posts/1/'))
.set('Authorization', 'Bearer ' + accesstoken) .set('Authorization', 'Bearer ' + accesstoken)
@ -577,7 +577,7 @@ describe('Post API', function () {
var putBody = res.body; var putBody = res.body;
_.has(res.headers, 'x-cache-invalidate').should.equal(true); _.has(res.headers, 'x-cache-invalidate').should.equal(true);
putBody.should.exist; putBody.should.exist;
putBody.posts[0].page.should.eql(changedValue); putBody.posts[0].page.should.be.ok;
testUtils.API.checkResponse(putBody.posts[0], 'post'); testUtils.API.checkResponse(putBody.posts[0], 'post');
done(); done();
@ -595,11 +595,11 @@ describe('Post API', function () {
return done(err); return done(err);
} }
var jsonResponse = res.body, var jsonResponse = res.body;
changedValue = false;
jsonResponse.should.exist; jsonResponse.should.exist;
jsonResponse.posts[0].page.should.eql(true); jsonResponse.posts[0].page.should.be.ok;
jsonResponse.posts[0].page = changedValue; jsonResponse.posts[0].page = false;
request.put(testUtils.API.getApiQuery('posts/7/')) request.put(testUtils.API.getApiQuery('posts/7/'))
.set('Authorization', 'Bearer ' + accesstoken) .set('Authorization', 'Bearer ' + accesstoken)
@ -616,7 +616,7 @@ describe('Post API', function () {
_.has(res.headers, 'x-cache-invalidate').should.equal(true); _.has(res.headers, 'x-cache-invalidate').should.equal(true);
putBody.should.exist; putBody.should.exist;
putBody.posts[0].page.should.eql(changedValue); putBody.posts[0].page.should.not.be.ok;
testUtils.API.checkResponse(putBody.posts[0], 'post'); testUtils.API.checkResponse(putBody.posts[0], 'post');
done(); done();
}); });
@ -932,7 +932,7 @@ describe('Post API', function () {
jsonResponse.posts.should.exist; jsonResponse.posts.should.exist;
testUtils.API.checkResponse(jsonResponse.posts[0], 'post'); testUtils.API.checkResponse(jsonResponse.posts[0], 'post');
jsonResponse.posts[0].slug.should.not.match(/^\/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/); jsonResponse.posts[0].slug.should.not.match(/^\/[0-9]{4}\/[0-9]{2}\/[0-9]{2}/);
jsonResponse.posts[0].page.should.eql(0); jsonResponse.posts[0].page.should.not.be.ok;
done(); done();
}); });
}); });

View file

@ -94,12 +94,12 @@
"grunt-shell": "~1.1.1", "grunt-shell": "~1.1.1",
"grunt-update-submodules": "~0.4.1", "grunt-update-submodules": "~0.4.1",
"matchdep": "~0.3.0", "matchdep": "~0.3.0",
"nock": "0.47.0", "nock": "0.52.4",
"require-dir": "~0.1.0", "require-dir": "~0.1.0",
"rewire": "~2.1.0", "rewire": "~2.1.0",
"should": "~4.0.4", "should": "~4.4.2",
"sinon": "~1.10.3", "sinon": "~1.12.2",
"supertest": "~0.13.0", "supertest": "~0.15.0",
"testem": "^0.6.23", "testem": "^0.6.23",
"top-gh-contribs": "0.0.2" "top-gh-contribs": "0.0.2"
} }