Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix test suite #27

Merged
merged 3 commits into from

2 participants

@janl

This series fixes the test suite:

  • remove debug logging
  • fix wrong testing credit card number
  • fix token creation request
@abh
@abh

Doh, 4111111111111111 used to be the correct test number. Thank you!

@abh abh merged commit 0072fa6 into stripe:master
@janl

Sweet, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 18, 2012
  1. @janl

    remove debug logging

    janl authored
  2. @janl

    fix test cc number

    janl authored
  3. @janl
This page is out of date. Refresh to see the latest.
View
1  test/charges.js
@@ -26,7 +26,6 @@ vows.describe("Charges API").addBatch({
},
'returns a charge' : function(err, response) {
assert.isNull(err);
- console.log("response", response);
assert.isDefined(response);
assert.equal(response.object, 'charge');
assert.isDefined(response.id);
View
5 test/customers.js
@@ -18,7 +18,6 @@ vows.describe("Customer API").addBatch({
},
'returns a customer': function(err, response) {
assert.isNull(err);
- console.log("response", response);
assert.isDefined(response);
assert.equal(response.object, 'customer');
assert.equal(response.email, "foo@example.com");
@@ -35,7 +34,7 @@ vows.describe("Customer API").addBatch({
topic: function(create_err, customer) {
stripe.customers.update(customer.id, {
description: "test",
- card: { number: "4111111111111111",
+ card: { number: "4242424242424242",
exp_month: 12,
exp_year: 2020,
name: "T. Ester"
@@ -50,11 +49,9 @@ vows.describe("Customer API").addBatch({
},
'Delete customer' : {
topic: function(create_err, customer) {
- console.log("customer for deletion", customer);
stripe.customers.del(customer.id, this.callback);
},
'Customer was deleted': function(err,response) {
- console.log("response", response);
assert.isNull(err);
assert.isTrue(response.deleted);
}
View
10 test/invoices.js
@@ -27,7 +27,6 @@ vows.describe("Invoice API").addBatch({
'returns a plan': function(err, response) {
assert.isNull(err);
- console.log('response', response);
assert.isDefined(response);
assert.equal(response.object, 'plan');
assert.equal(response.id, 'foobarbaz_plan');
@@ -40,7 +39,7 @@ vows.describe("Invoice API").addBatch({
stripe.customers.create({
email: "foo@example.com",
plan: plan.id,
- card: { number: "4111111111111111",
+ card: { number: "4242424242424242",
exp_month: d.getMonth() + 1,
exp_year: d.getFullYear() + 1,
name: "T. Ester"
@@ -50,7 +49,6 @@ vows.describe("Invoice API").addBatch({
'returns a customer': function(err, response) {
assert.isNull(err);
- console.log("response", response);
assert.isDefined(response);
assert.equal(response.object, 'customer');
assert.equal(response.email, "foo@example.com");
@@ -68,7 +66,6 @@ vows.describe("Invoice API").addBatch({
'created a charge': function(err, response) {
assert.isNull(err);
- console.log('response', response);
assert.isDefined(response);
assert.equal(response.object, 'charge');
assert.equal(response.paid, true);
@@ -80,7 +77,6 @@ vows.describe("Invoice API").addBatch({
'receives a list of invoices': function(err, response) {
assert.isNull(err);
- console.log('response', response);
assert.isDefined(response);
assert.isArray(response.data);
assert.strictEqual(response.data.length > 0, true);
@@ -97,7 +93,6 @@ vows.describe("Invoice API").addBatch({
'received invoice': function(err, response) {
assert.isNull(err);
- console.log('response', response);
assert.isDefined(response);
assert.equal(response.object, 'invoice');
assert.strictEqual(response.total > 0, true);
@@ -109,7 +104,6 @@ vows.describe("Invoice API").addBatch({
'received upcoming invoice': function(err, response) {
assert.isNull(err);
- console.log('response', response);
assert.isDefined(response);
assert.equal(response.object, 'invoice');
assert.strictEqual(response.total > 0, true);
@@ -121,7 +115,6 @@ vows.describe("Invoice API").addBatch({
'customer deleted': function(err, response) {
assert.isNull(err);
- console.log('response', response);
assert.isDefined(response);
assert.isTrue(response.deleted);
},
@@ -132,7 +125,6 @@ vows.describe("Invoice API").addBatch({
'deleted the subscription plan': function(err, response) {
assert.isNull(err);
- console.log('response', response);
assert.isDefined(response);
assert.isTrue(response.deleted);
}
View
6 test/plans.js
@@ -36,7 +36,6 @@ vows.describe("Subscription Plans API").addBatch({
},
'returns a plan': function(err, response) {
assert.isNull(err);
- console.log('response', response);
assert.isDefined(response);
assert.equal(response.object, 'plan');
assert.equal(response.id, 'foobarbaz_plan');
@@ -53,7 +52,6 @@ vows.describe("Subscription Plans API").addBatch({
var p = getFirstPlan();
assert.isNull(err);
- console.log('response', response);
assert.isDefined(response);
assert.equal(response.id, p.id);
}
@@ -70,7 +68,6 @@ vows.describe("Subscription Plans API").addBatch({
},
'returns a plan': function(err, response) {
assert.isNull(err);
- console.log('response', response);
assert.isDefined(response);
assert.equal(response.object, 'plan');
assert.equal(response.id, 'bazbarfoo_plan');
@@ -85,7 +82,6 @@ vows.describe("Subscription Plans API").addBatch({
},
'returns a list of plans': function(err, response) {
assert.isNull(err);
- console.log('response', response);
assert.isDefined(response);
assert.isNumber(response.count);
@@ -102,7 +98,6 @@ vows.describe("Subscription Plans API").addBatch({
var p = getFirstPlan(true);
- console.log('response', response);
assert.isDefined(response);
assert.isTrue(response.deleted);
assert.equal(response.id, p.id);
@@ -118,7 +113,6 @@ vows.describe("Subscription Plans API").addBatch({
var p = getFirstPlan(true);
- console.log('response', response);
assert.isDefined(response);
assert.isTrue(response.deleted);
assert.equal(response.id, p.id);
View
5 test/tokens.js
@@ -18,12 +18,11 @@ vows.describe("Tokens API").addBatch({
'Create token' : {
topic: function() {
stripe.token.create({
- card: { number: "4111111111111111",
+ card: { number: "4242424242424242",
exp_month: 1,
exp_year: 2021,
name: "J. Ester"
- },
- amount: 77
+ }
}, this.callback);
},
'Got card token': function(err, token) {
Something went wrong with that request. Please try again.