diff options
| author | Rene Ae <aehtyb@gmail.com> | 2015-11-11 20:20:40 -0600 |
|---|---|---|
| committer | Rene Ae <aehtyb@gmail.com> | 2015-11-11 20:20:40 -0600 |
| commit | 962b2fe877d761a4abe957d138f7f435a8d62cb0 (patch) | |
| tree | b7d18c4ff686cc2c2ccf06e8b5631e6505c45ec6 /test | |
| parent | 0f1a1220b9085f1da05ce6fce8da11d8045b7dde (diff) | |
more payment tests
Diffstat (limited to 'test')
| -rw-r--r-- | test/test/04-cart.js | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/test/test/04-cart.js b/test/test/04-cart.js index 7638bac2..4457712f 100644 --- a/test/test/04-cart.js +++ b/test/test/04-cart.js @@ -142,8 +142,8 @@ describe('shipping', function(){ }) describe('#set_delivery_type()', function(){ - //RETURNING A 415 ERROR (which isnt listed as potential error).. ? - + //RETURNING A 415 ERROR (which isnt listed as potential error).. ? + it('set delivery type', function(done){ var d_type = { "Id": 1, @@ -214,17 +214,7 @@ describe('payment', function(){ }) }) }) - describe('#list_credit_cards()', function(){ - // send nothing - it('list credit cards', function(done){ - promise(sdk.payment.list_credit_cards, { data: {} }).then(function(data){ - assert(data.Header.StatusCode == 200) - console.log("listing credit cards"); - console.log(data) - done() - }) - }) - }) + var last_guid @@ -252,6 +242,18 @@ describe('payment', function(){ }) }) }) + + describe('#list_credit_cards()', function(){ + // send nothing + it('list credit cards', function(done){ + promise(sdk.payment.list_credit_cards, { data: {} }).then(function(data){ + assert(data.Header.StatusCode == 200) + console.log(data) + done() + }) + }) + }) + describe('#delete_credit_card()', function(){ it('delete credit card', function(done){ promise(sdk.payment.delete_credit_card, { guid: last_guid }).then(function(data){ @@ -295,17 +297,27 @@ describe('payment', function(){ }) }) }) - + + // TODO: list the credit cards on file + describe('#use_stored_credit_card()', function(){ /* it('use stored credit card', function(done){ - promise(sdk.cart.use_stored_credit_card, { data: {} }).then(function(data){ + var card_on_file = { + "Guid": opt.guid, + "UserId": auth.user_id, + "AccessToken": auth.access_token, + "Cvv": opt.cvv, + "Issue": opt.issue, + } + promise(sdk.cart.use_stored_credit_card, { data: card_on_file }).then(function(data){ assert(data.Header.StatusCode == 200) done() }) }) - */ +*/ }) + }) |
