Permalink
Browse files

FIXED - Set explicit versions in package.json

  • Loading branch information...
1 parent 4ad80d9 commit 2a0d77b09a2584c69ed88be722b86392e57846ca @angelini committed Mar 6, 2012
Showing with 13 additions and 12 deletions.
  1. +5 −5 package.json
  2. +8 −7 tests/connectIntegration-test.js
View
10 package.json
@@ -2,7 +2,7 @@
"name": "resty",
"description": "Build quick and simple RESTfull APIs using Node.js and connect",
"keywords": ["rest", "node", "connect", "simple"],
- "version": "0.0.2",
+ "version": "0.0.3",
"repository": {
"type": "git",
"url": "git://github.com/SoapyIllusions/resty"
@@ -13,12 +13,12 @@
"node": ">=0.4.10"
},
"scripts": {
- "test": "vows ./tests/*"
+ "test": "node_modules/vows/bin/vows ./tests/*"
},
"devDependencies": {
- "connect": ">= 1.8.5",
- "vows": ">= 0.6.1",
- "request": ">= 2.9.3"
+ "connect": "1.8.5",
+ "vows": "0.6.1",
+ "request": "2.9.3"
},
"licenses": [
{
View
15 tests/connectIntegration-test.js
@@ -22,7 +22,7 @@ vows.describe('Using connect').addBatch({
'should contain {all: "users"}': function(err, res, body) {
assert.isNull(err);
- assert.equal(body.all, 'users');
+ assert.equal(JSON.parse(body).all, 'users');
}
},
@@ -33,7 +33,7 @@ vows.describe('Using connect').addBatch({
'should contain {all: "users"}': function(err, res, body) {
assert.isNull(err);
- assert.equal(body.all, 'users');
+ assert.equal(JSON.parse(body).all, 'users');
}
},
@@ -44,7 +44,7 @@ vows.describe('Using connect').addBatch({
'should contain {uid: 123}': function(err, res, body) {
assert.isNull(err);
- assert.equal(body.uid, '123');
+ assert.equal(JSON.parse(body).uid, '123');
}
},
@@ -55,6 +55,7 @@ vows.describe('Using connect').addBatch({
'should contain a uid and cid': function(err, res, body) {
assert.isNull(err);
+ body = JSON.parse(body);
assert.equal(body.uid, '123');
assert.equal(body.cid, '456');
}
@@ -67,7 +68,7 @@ vows.describe('Using connect').addBatch({
'should have accessed the querystring': function(err, res, body) {
assert.isNull(err);
- assert.equal(body.query.hello, 'world');
+ assert.equal(JSON.parse(body).query.hello, 'world');
}
},
@@ -85,7 +86,7 @@ vows.describe('Using connect').addBatch({
'should have accessed the body': function(err, res, body) {
assert.isNull(err);
- assert.equal(body.body.test, 'data');
+ assert.equal(JSON.parse(body).body.test, 'data');
}
},
@@ -96,7 +97,7 @@ vows.describe('Using connect').addBatch({
'should return Resource Not Found': function(err, res, body) {
assert.isNull(err);
- assert.equal(body.error, 'Resource Not Found');
+ assert.equal(JSON.parse(body).error, 'Resource Not Found');
}
},
@@ -114,7 +115,7 @@ vows.describe('Using connect').addBatch({
'should return Method Not Found': function(err, res, body) {
assert.isNull(err);
- assert.equal(body.error, 'Method Not Found');
+ assert.equal(JSON.parse(body).error, 'Method Not Found');
}
}
})['export'](module);

0 comments on commit 2a0d77b

Please sign in to comment.