Skip to content

Commit

Permalink
Added check for version to be sure of successful instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
gomfunkel committed Oct 9, 2012
1 parent e2c3586 commit 2916dff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/MailChimpAPI/MailChimpAPI.js
Expand Up @@ -19,6 +19,7 @@ vows.describe('MailChimpAPI').addBatch({
topic: function () { return new MailChimpAPI('apiKey-dc') }, topic: function () { return new MailChimpAPI('apiKey-dc') },
'successfully creates an instance': function (topic) { 'successfully creates an instance': function (topic) {
assert.isObject(topic); assert.isObject(topic);
assert.strictEqual(topic.version, '1.3');
} }
}, },


Expand All @@ -33,6 +34,7 @@ vows.describe('MailChimpAPI').addBatch({
topic: function () { return new MailChimpAPI('apiKey-dc', { version: '1.3' }) }, topic: function () { return new MailChimpAPI('apiKey-dc', { version: '1.3' }) },
'successfully creates an instance': function (topic) { 'successfully creates an instance': function (topic) {
assert.isObject(topic); assert.isObject(topic);
assert.strictEqual(topic.version, '1.3');
} }
}, },


Expand Down
2 changes: 2 additions & 0 deletions test/MailChimpExportAPI/MailChimpExportAPI.js
Expand Up @@ -19,6 +19,7 @@ vows.describe('MailChimpExportAPI').addBatch({
topic: function () { return new MailChimpExportAPI('apiKey-dc') }, topic: function () { return new MailChimpExportAPI('apiKey-dc') },
'successfully creates an instance': function (topic) { 'successfully creates an instance': function (topic) {
assert.isObject(topic); assert.isObject(topic);
assert.strictEqual(topic.version, '1.0');
} }
}, },


Expand All @@ -33,6 +34,7 @@ vows.describe('MailChimpExportAPI').addBatch({
topic: function () { return new MailChimpExportAPI('apiKey-dc', { version: '1.0' }) }, topic: function () { return new MailChimpExportAPI('apiKey-dc', { version: '1.0' }) },
'successfully creates an instance': function (topic) { 'successfully creates an instance': function (topic) {
assert.isObject(topic); assert.isObject(topic);
assert.strictEqual(topic.version, '1.0');
} }
}, },


Expand Down

0 comments on commit 2916dff

Please sign in to comment.