Skip to content

Commit

Permalink
fix some failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismcv committed Apr 20, 2012
1 parent 51f69fc commit d8e5146
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/gateway-client.js
Expand Up @@ -25,11 +25,12 @@ function GatewayClient(opts, authInfo){
}

var req = https.request(options);

req.end(requestString);
req.on('response', function(res){
res.on('data', function(data){
// TODO add error handling
callback(opts.responseParser.parseResponse(requestString, data.toString(), opts.responseOptions))
callback(opts.responseParser.parseResponse(request, data.toString(), opts.responseOptions))
})
})
}
Expand Down
4 changes: 2 additions & 2 deletions spec/helpers/transactions.js
Expand Up @@ -19,7 +19,7 @@ exports.missingCardNumber = {amt:'99.06'
,paymentaction:'Sale'
,ipaddress:'1.1.1.1'
,creditcardtype:'Visa'
,expdate:'032011'
,expdate:'032020'
,cvv2:'000'
,firstname:'John'
,lastname:'Doe'
Expand All @@ -39,7 +39,7 @@ var doDirectPaymentSigUser = {user:'webpro_1279778538_biz_api1.gmail.com'
,ipaddress:'1.1.1.1'
,creditcardtype:'Visa'
,acct:'4834907016040081'
,expdate:'032011'
,expdate:'032020'
,cvv2:'000'
,firstname:'John'
,lastname:'Doe'
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/payflowpro/doDirectPayment.spec.js
Expand Up @@ -35,7 +35,7 @@ function examplesUsing(client){
}),
'contains error messages in an array':one(function(result){
assert.isArray(result.errors)
assert.equal(1, result.errors.length)
assert.equal(1, result.errors.length, result.errors)
}),
'error object contains associated information':one(function(result){
result.errors.forEach(function(err){
Expand Down

0 comments on commit d8e5146

Please sign in to comment.