Skip to content

Commit

Permalink
Remove json parse test
Browse files Browse the repository at this point in the history
The built-in JSON parsing in request is now being used, so there's no
need to test this explicitly.
  • Loading branch information
dannyamey committed Mar 23, 2014
1 parent 202baa8 commit dd7cb48
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,6 @@ test('json format is added by default', function(t) {
});


test('json response is parsed automatically', function(t) {
requestMock = sinon.stub().callsArgWith(2
, null
, {
statusCode: 200
, headers: {
'content-type': 'application/json'
}
}
, '{ "test": "json" }');

var spy = sinon.spy()
, yam = new Yammer();

yam.request({
uri: '/test.json'
}, spy);

t.ok(spy.calledWithMatch(null, { test: 'json' }), 'json response is parsed');
return t.end();
});

test('400 response returns error', function(t) {
requestMock = sinon.stub().callsArgWith(2
, null
Expand Down

0 comments on commit dd7cb48

Please sign in to comment.