diff --git a/test/request/query.js b/test/request/query.js index 20f4410..0d54c8b 100644 --- a/test/request/query.js +++ b/test/request/query.js @@ -2,12 +2,13 @@ 'use strict'; var context = require('../context'); +var should = require('should'); describe('ctx.query', function(){ describe('when missing', function(){ it('should return an empty object', function(){ var ctx = context({ url: '/' }); - ctx.query.should.eql({}); + should(ctx.query).empty; }) it('should return the same object each time it\'s accessed', function(done) { diff --git a/test/request/querystring.js b/test/request/querystring.js index 9885c56..be3d6a3 100644 --- a/test/request/querystring.js +++ b/test/request/querystring.js @@ -3,6 +3,7 @@ var context = require('../context'); var parseurl = require('parseurl'); +var should = require('should'); describe('ctx.querystring', function(){ it('should return the querystring', function(){ @@ -32,10 +33,8 @@ describe('ctx.querystring=', function(){ ctx.querystring = 'page=2&color=blue'; ctx.url.should.equal('/store/shoes?page=2&color=blue'); ctx.search.should.equal('?page=2&color=blue'); - ctx.query.should.eql({ - page: '2', - color: 'blue' - }); + should(ctx.query).have.property('page', '2'); + should(ctx.query).have.property('color', 'blue'); }) it('should change .url but not .originalUrl', function(){ diff --git a/test/request/search.js b/test/request/search.js index 99a1323..8218a38 100644 --- a/test/request/search.js +++ b/test/request/search.js @@ -2,6 +2,7 @@ 'use strict'; var context = require('../context'); +var should = require('should'); describe('ctx.search=', function(){ it('should replace the search', function(){ @@ -16,10 +17,8 @@ describe('ctx.search=', function(){ ctx.search = '?page=2&color=blue'; ctx.url.should.equal('/store/shoes?page=2&color=blue'); ctx.querystring.should.equal('page=2&color=blue'); - ctx.query.should.eql({ - page: '2', - color: 'blue' - }); + should(ctx.query).have.property('page', '2'); + should(ctx.query).have.property('color', 'blue'); }) it('should change .url but not .originalUrl', function(){