diff options
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() }) }) - */ +*/ }) + }) |
