diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-22 15:15:32 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-22 15:15:32 -0500 |
| commit | 46bca0d394d4c327d692a081f9afedcf7e05c146 (patch) | |
| tree | 05655d88f5549a20839eec0158c75e093afeed98 /test | |
| parent | 0b330d8d365f8cba80d0ead6f59f66cc6ee1ffcd (diff) | |
signup works
Diffstat (limited to 'test')
| -rw-r--r-- | test/test/04-cart.js | 8 | ||||
| -rw-r--r-- | test/test/05-cart-flows.js | 46 |
2 files changed, 50 insertions, 4 deletions
diff --git a/test/test/04-cart.js b/test/test/04-cart.js index d394b59f..7944758b 100644 --- a/test/test/04-cart.js +++ b/test/test/04-cart.js @@ -82,7 +82,7 @@ describe('cart', function(){ describe('shipping', function(){ describe('#set_shipping_address()', function(){ - it('set shipping address', function(done){ + it('sets shipping address', function(done){ var shipping_info = { "Name":"Nome", "Surname":"Cognome", @@ -102,7 +102,7 @@ describe('shipping', function(){ }) }) describe('#get_box_types()', function(){ - it('get box types', function(done){ + it('gets box types', function(done){ promise(sdk.shipping.get_box_types, { data: {} }).then(function(data){ // console.log(data) assert(data.Header.StatusCode == 200) @@ -111,7 +111,7 @@ describe('shipping', function(){ }) }) describe('#set_box_type()', function(){ - it('set box types', function(done){ + it('sets box types', function(done){ // box might be hard coded to 'standard' ? var box_type = { "Type": "Standard" @@ -136,7 +136,7 @@ describe('shipping', function(){ //RETURNING A 415 ERROR (which isnt listed as potential error).. ? - it('set delivery type', function(done){ + it('sets delivery type', function(done){ var d_type = { "Id": 1, } diff --git a/test/test/05-cart-flows.js b/test/test/05-cart-flows.js index c5173f3d..96ccfaf5 100644 --- a/test/test/05-cart-flows.js +++ b/test/test/05-cart-flows.js @@ -45,5 +45,51 @@ describe('cart_flows', function(){ done() }) }) + + it('sets shipping address', function(done){ + var shipping_info = { + "Name":"Nome", + "Surname":"Cognome", + "Email":"prova@prova.it", + "Phone":"333-333-3333", + "Mobile":"333-333-3333", + "StreetWithNumber":"555 StreetNumber\nBlah Blah", + "PostalCode":"11101", + "City":"Long Island City", + "Region":"NY", + "CountryCode":"US", + } + promise(sdk.cart.set_shipping_address, { data: shipping_info }).then(function(data){ + assert(data.Header.StatusCode == 200) + done() + }) + }) + + it('sets credit card', function(done){ + + var credit_info = { + "Guid": null, + "HolderName": "Name2", + "HolderSurname": "Surname2", + "HolderAddress": "via del pino, 4", + "HolderCity": "Monterenzio", + "HolderProvince": "BO", + "HolderZip": "40050", + "HolderISOCountry": "IT", + "HolderEmail": "mailTest@mail2.it", + "CardNumber": "123456789012345", + "Type": "Visa", + "ExpirationMonth": "1", + "ExpirationYear": "12", + "Cvv": "123", + "Last4": "2345", + } + + promise(sdk.cart.set_credit_card, { data: credit_info }).then(function(data){ + assert(data.Header.StatusCode == 200) + done() + }) + }) + }) })
\ No newline at end of file |
