cheddargetter
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -22,3 +22,4 @@ var https = require("https"); | ||
headers: {authorization: this.auth}, | ||
path: "/xml" + path | ||
path: "/xml" + path, | ||
method: "POST" | ||
}; | ||
@@ -29,3 +30,2 @@ | ||
config.method = "POST"; | ||
config.headers["Content-Type"] = "application/x-www-form-urlencoded"; | ||
@@ -32,0 +32,0 @@ config.headers["Content-Length"] = data.length; |
{ | ||
"name": "cheddargetter", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"author": "Kevin Smith", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -83,4 +83,14 @@ var fs = require("fs"); | ||
}, function (result, cb) { | ||
cg.getCustomer("test", cb); | ||
}, function (result, cb) { | ||
test.equal(parseInt(result.customer.subscriptions.subscription.items.item[0].quantity, 10), 5); | ||
cb(null, {}); | ||
}, function (result, cb) { | ||
cg.addItem("test", config.itemCode, 2, cb); | ||
}, function (result, cb) { | ||
cg.getCustomer("test", cb); | ||
}, function (result, cb) { | ||
test.equal(parseInt(result.customer.subscriptions.subscription.items.item[0].quantity, 10), 5 + 2); | ||
cb(null, {}); | ||
}, function (result, cb) { | ||
cg.addItem("test", config.itemCode, cb); | ||
@@ -90,3 +100,3 @@ }, function (result, cb) { | ||
}, function (result, cb) { | ||
test.equal(result.customer.subscriptions.subscription.items.item[0].quantity, "7"); | ||
test.equal(parseInt(result.customer.subscriptions.subscription.items.item[0].quantity, 10), 5 + 2 + 1); | ||
cb(null, {}); | ||
@@ -96,2 +106,7 @@ }, function (result, cb) { | ||
}, function (result, cb) { | ||
cg.getCustomer("test", cb); | ||
}, function (result, cb) { | ||
test.equal(parseInt(result.customer.subscriptions.subscription.items.item[0].quantity, 10), 5 + 2 + 1 - 2); | ||
cb(null, {}); | ||
}, function (result, cb) { | ||
cg.removeItem("test", config.itemCode, cb); | ||
@@ -101,3 +116,3 @@ }, function (result, cb) { | ||
}, function (result, cb) { | ||
test.equal(result.customer.subscriptions.subscription.items.item[0].quantity, "5"); | ||
test.equal(parseInt(result.customer.subscriptions.subscription.items.item[0].quantity, 10), 5 + 2 + 1 - 2 - 1); | ||
cb(null, {}); | ||
@@ -104,0 +119,0 @@ }, function (result, cb) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
16315
216