summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-17 18:14:40 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-17 18:14:40 +0200
commit712deb604be9d608b990c6ba1f9af2560e8f20e3 (patch)
treedfa8889be024038eaedcc238cb2892fdcc38f12e /test
parent76df508468975b9ffdd47373e5a406e21ac8cfdf (diff)
confirm error msg better
Diffstat (limited to 'test')
-rwxr-xr-xtest/package.json2
-rwxr-xr-xtest/test/01-product.js15
-rwxr-xr-xtest/test/05-cart-flows.js26
3 files changed, 29 insertions, 14 deletions
diff --git a/test/package.json b/test/package.json
index dd095e58..e6a2d845 100755
--- a/test/package.json
+++ b/test/package.json
@@ -10,7 +10,7 @@
"license": "LNT",
"dependencies": {
"jquery": "^2.1.4",
- "mocha": "^2.3.3",
+ "mocha": "^5.2.0",
"najax": "^0.2.1"
}
}
diff --git a/test/test/01-product.js b/test/test/01-product.js
index 636c3187..66e89626 100755
--- a/test/test/01-product.js
+++ b/test/test/01-product.js
@@ -8,6 +8,21 @@ var assert = require("assert")
describe('product', function(){
var test_item
+ describe('#collection_by_gallery()', function(){
+ it('returns a collection', function(done){
+ promise(sdk.product.collection_by_gallery).then(function(data){
+console.log(data)
+ assert(data.Header.StatusCode == 200)
+ assert(data.SearchResponseFull.Results.Items.length > 0)
+ test_item = data.SearchResponseFull.Results.Items[0]
+ done()
+ }).error(function(error){
+ console.log(error)
+ done()
+ })
+ })
+ })
+
describe('#collection()', function(){
it('returns a collection', function(done){
promise(sdk.product.collection).then(function(data){
diff --git a/test/test/05-cart-flows.js b/test/test/05-cart-flows.js
index 3a139ba0..f907e613 100755
--- a/test/test/05-cart-flows.js
+++ b/test/test/05-cart-flows.js
@@ -8,6 +8,7 @@ var assert = require("assert")
// sdk.cart.delete_item
// sdk.cart.get_status
+/*
describe('finalize_cart', function(){
var new_user_data = {
"Email": "blahtest+" + Math.floor(Math.random() * 10000000) + "@blahtest.com",
@@ -263,18 +264,17 @@ describe('finalize_cart', function(){
})
})
-/*
- describe('#secure_finalize()', function(){
- it('fails to finalize a cart with test data', function(done){
- promise(sdk.cart.secure_finalize, { ReturnUrl: "stoneisland.com", Token: sdk.auth.access_token }).then(function(data){
- console.log("SUCCESS", data)
- done()
- }).error(function(data){
- console.log("FAILURE", data)
- done()
- })
- })
- })
+ // describe('#secure_finalize()', function(){
+ // it('fails to finalize a cart with test data', function(done){
+ // promise(sdk.cart.secure_finalize, { ReturnUrl: "stoneisland.com", Token: sdk.auth.access_token }).then(function(data){
+ // console.log("SUCCESS", data)
+ // done()
+ // }).error(function(data){
+ // console.log("FAILURE", data)
+ // done()
+ // })
+ // })
+ // })
+})
*/
-})