From 9d82c2e360e5f2e2cb93e711dc6ce807f3463e38 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Thu, 1 Jan 2015 18:56:18 +0000 Subject: [PATCH] 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 --- core/test/functional/routes/api/posts_test.js | 30 +++++++++---------- package.json | 8 ++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/core/test/functional/routes/api/posts_test.js b/core/test/functional/routes/api/posts_test.js index 9cb4582c57..20bebd46bc 100644 --- a/core/test/functional/routes/api/posts_test.js +++ b/core/test/functional/routes/api/posts_test.js @@ -169,7 +169,7 @@ describe('Post API', function () { jsonResponse.posts.should.exist; testUtils.API.checkResponse(jsonResponse.posts[0], 'post'); 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].page).should.eql(true); jsonResponse.posts[0].author.should.be.a.Number; @@ -198,7 +198,7 @@ describe('Post API', function () { jsonResponse.posts.should.exist; testUtils.API.checkResponse(jsonResponse.posts[0], 'post'); 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].page).should.eql(true); jsonResponse.posts[0].author.should.be.a.Number; @@ -225,7 +225,7 @@ describe('Post API', function () { jsonResponse.should.exist; jsonResponse.posts.should.exist; 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; testUtils.API.checkResponse(jsonResponse.posts[0].author, 'user'); @@ -251,7 +251,7 @@ describe('Post API', function () { jsonResponse.should.exist; jsonResponse.posts.should.exist; 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); done(); }); @@ -557,11 +557,11 @@ describe('Post API', function () { return done(err); } - var jsonResponse = res.body, - changedValue = true; + var jsonResponse = res.body; + jsonResponse.should.exist; - jsonResponse.posts[0].page.should.eql(0); - jsonResponse.posts[0].page = changedValue; + jsonResponse.posts[0].page.should.not.be.ok; + jsonResponse.posts[0].page = true; request.put(testUtils.API.getApiQuery('posts/1/')) .set('Authorization', 'Bearer ' + accesstoken) @@ -577,7 +577,7 @@ describe('Post API', function () { var putBody = res.body; _.has(res.headers, 'x-cache-invalidate').should.equal(true); putBody.should.exist; - putBody.posts[0].page.should.eql(changedValue); + putBody.posts[0].page.should.be.ok; testUtils.API.checkResponse(putBody.posts[0], 'post'); done(); @@ -595,11 +595,11 @@ describe('Post API', function () { return done(err); } - var jsonResponse = res.body, - changedValue = false; + var jsonResponse = res.body; + jsonResponse.should.exist; - jsonResponse.posts[0].page.should.eql(true); - jsonResponse.posts[0].page = changedValue; + jsonResponse.posts[0].page.should.be.ok; + jsonResponse.posts[0].page = false; request.put(testUtils.API.getApiQuery('posts/7/')) .set('Authorization', 'Bearer ' + accesstoken) @@ -616,7 +616,7 @@ describe('Post API', function () { _.has(res.headers, 'x-cache-invalidate').should.equal(true); 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'); done(); }); @@ -932,7 +932,7 @@ describe('Post API', function () { jsonResponse.posts.should.exist; 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].page.should.eql(0); + jsonResponse.posts[0].page.should.not.be.ok; done(); }); }); diff --git a/package.json b/package.json index 334fc18012..ea036c3a4a 100644 --- a/package.json +++ b/package.json @@ -94,12 +94,12 @@ "grunt-shell": "~1.1.1", "grunt-update-submodules": "~0.4.1", "matchdep": "~0.3.0", - "nock": "0.47.0", + "nock": "0.52.4", "require-dir": "~0.1.0", "rewire": "~2.1.0", - "should": "~4.0.4", - "sinon": "~1.10.3", - "supertest": "~0.13.0", + "should": "~4.4.2", + "sinon": "~1.12.2", + "supertest": "~0.15.0", "testem": "^0.6.23", "top-gh-contribs": "0.0.2" }