From e69d71924d99050677ab4b2c0a088df52e7605c9 Mon Sep 17 00:00:00 2001 From: "Ryan X. Charles" Date: Wed, 2 Jul 2014 17:54:27 -0700 Subject: [PATCH] add test for setObj --- test/test.PayPro.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/test.PayPro.js b/test/test.PayPro.js index c56eb20..ab1b710 100644 --- a/test/test.PayPro.js +++ b/test/test.PayPro.js @@ -177,6 +177,21 @@ describe('PayPro', function() { }); + describe('#setObj', function() { + + it('should set properties of paymentdetails', function() { + var pd = new PayPro.PaymentDetails(); + var paypro = new PayPro(); + paypro.messageType = "PaymentDetails"; + paypro.message = pd; + paypro.setObj({ + time: 0 + }); + paypro.get('time').should.equal(0); + }); + + }); + describe('#serializeForSig', function() { it('should serialize a PaymentRequest and not fail', function() {