Permalink
Browse files

fixed tests

  • Loading branch information...
1 parent 9b14d58 commit 4e4136436f945f7ad9a03b070b62eb7101613145 @masylum committed Jun 6, 2011
Showing with 8 additions and 7 deletions.
  1. +8 −7 tests/facebook_client.js
View
@@ -21,7 +21,7 @@ testosterone
done();
})
- .add('`apiCall` ok', function (done) {
+ .add('`apiCall` error', function (done) {
facebook_client.apiCall(
'GET'
, '/search'
@@ -32,20 +32,21 @@ testosterone
}
, function (error, response, body) {
assert.equal(error, null);
- assert.equal(response.statusCode, 200);
- assert.equal(body.data[0].name, 'Museum of Contemporary Native Arts');
+ assert.equal(response.statusCode, 400);
done();
}
);
})
- .add('`apiCall` error', function (done) {
+ .add('`apiCall` ok', function (done) {
facebook_client.apiCall(
- 'FOO'
- , '/inexistant_url'
+ 'GET'
+ , '/2439131959'
, {}
, function (error, response, body) {
- assert.ok(error);
+ assert.equal(error, null);
+ assert.equal(response.statusCode, 200);
+ assert.equal(body.name, 'Graffiti');
done();
}
);

0 comments on commit 4e41364

Please sign in to comment.