Permalink
Browse files

Added check for version to be sure of successful instantiation

  • Loading branch information...
gomfunkel committed Oct 9, 2012
1 parent e2c3586 commit 2916dff5da1ea2f5b3039ff94c826aea0e9511ca
Showing with 4 additions and 0 deletions.
  1. +2 −0 test/MailChimpAPI/MailChimpAPI.js
  2. +2 −0 test/MailChimpExportAPI/MailChimpExportAPI.js
@@ -19,6 +19,7 @@ vows.describe('MailChimpAPI').addBatch({
topic: function () { return new MailChimpAPI('apiKey-dc') },
'successfully creates an instance': function (topic) {
assert.isObject(topic);
+ assert.strictEqual(topic.version, '1.3');
}
},
@@ -33,6 +34,7 @@ vows.describe('MailChimpAPI').addBatch({
topic: function () { return new MailChimpAPI('apiKey-dc', { version: '1.3' }) },
'successfully creates an instance': function (topic) {
assert.isObject(topic);
+ assert.strictEqual(topic.version, '1.3');
}
},
@@ -19,6 +19,7 @@ vows.describe('MailChimpExportAPI').addBatch({
topic: function () { return new MailChimpExportAPI('apiKey-dc') },
'successfully creates an instance': function (topic) {
assert.isObject(topic);
+ assert.strictEqual(topic.version, '1.0');
}
},
@@ -33,6 +34,7 @@ vows.describe('MailChimpExportAPI').addBatch({
topic: function () { return new MailChimpExportAPI('apiKey-dc', { version: '1.0' }) },
'successfully creates an instance': function (topic) {
assert.isObject(topic);
+ assert.strictEqual(topic.version, '1.0');
}
},

0 comments on commit 2916dff

Please sign in to comment.