Skip to content

Commit

Permalink
refactored test for oauth_body_hash PLAINTEXT signature_method
Browse files Browse the repository at this point in the history
  • Loading branch information
aesopwolf committed Apr 24, 2015
1 parent 5498b46 commit b9c3c43
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/test-oauth.js
Expand Up @@ -574,7 +574,7 @@ tape('body_hash automatic built', function(t) {
})

tape('body_hash PLAINTEXT signature_method', function(t) {
try {
t.throws(function() {
request.post(
{ url: 'http://example.com'
, oauth:
Expand All @@ -583,11 +583,10 @@ tape('body_hash PLAINTEXT signature_method', function(t) {
, signature_method: 'PLAINTEXT'
}
, json: {foo: 'bar'}
})
} catch(e) {
process.nextTick(function() {
t.equal(typeof e, 'object')
}, function () {
t.fail('body_hash is not allowed with PLAINTEXT signature_method')
t.end()
})
}
}, /oauth: PLAINTEXT signature_method not supported with body_hash signing/)
t.end()
})

0 comments on commit b9c3c43

Please sign in to comment.