Permalink
Browse files

A couple updates to test a little more.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
  • Loading branch information...
1 parent ba59efd commit a39176c382851b7f1b1536c2b6134292f7d03975 @ncb000gt committed Mar 9, 2011
Showing with 8 additions and 4 deletions.
  1. +5 −1 tests/suites/test-cluster.js
  2. +3 −3 tests/utils.js
@@ -13,11 +13,15 @@ module.exports = testCase({
});
},
'delete cluster indices': function(assert) {
- assert.expect(2);
+ assert.expect(4);
+ var self = this;
+
var cluster = new Cluster();
cluster.deleteIndices(function(err, status) {
assert.ifError(err);
assert.ok(status.success);
+ assert.equal(status.indices.length, 1);
+ assert.deepEqual(status.indices, [self.idx_name]);
assert.done();
});
}
View
@@ -27,9 +27,9 @@ exports.clientTestCase = clientTestCase;
function indexTestCase(suite) {
suite.setUp = function(done) {
- var self = this,
- idx_name = 'test'+(new Date()).getTime();
- this.index = new Index({name: idx_name});
+ var self = this;
+ this.idx_name = 'test'+(new Date()).getTime();
+ this.index = new Index({name: this.idx_name});
this.index.create(function(err, res) {
done();
});

0 comments on commit a39176c

Please sign in to comment.