Permalink
Browse files

Removed a few legacy refs.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
  • Loading branch information...
1 parent 5a2c666 commit 631494dd151518f9edb82d7e58e5afdc5eff2aa0 @ncb000gt committed Mar 8, 2011
Showing with 2 additions and 53 deletions.
  1. +0 −33 tests/test-client.js
  2. +0 −18 tests/test-query.js
  3. +2 −2 tests/utils.js
View
33 tests/test-client.js
@@ -1,33 +0,0 @@
-var lib = require('../index'),
- assert = require('assert');
-
-module.exports = {
- 'test client connection': function(beforeExit) {
- var n = 0;
- var client = lib.createClient({index:'_all'});
- client.status({}, function(err, status) {
- assert.ok(status.ok);
- n++;
- });
- beforeExit(function() {
- assert.equal(1, n, 'callbacks');
- });
- },
- 'add and find document': function(beforeExit) {
- var n = 0;
- var doc = {field1: 'test field', field2: 'second test field'};
- var client = lib.createClient({index:'test'});
- client.add({type:'info', id:'1'}, doc, function(err, result) {
- assert.ok(result.ok);
- n++;
- client.query({query: {field: {field1: 'test'}}}, function(err, result) {
- assert.equal(result.hits.total, 1);
- assert.deepEqual(result.hits.hits[0]._source, doc);
- n++;
- });
- });
- beforeExit(function() {
- assert.equal(2, n, 'callbacks');
- });
- }
-}
View
18 tests/test-query.js
@@ -1,18 +0,0 @@
-var es = require('../index'),
- assert = require('assert');
-
-module.exports = {
- 'add field': function() {
- var field = {query: 'text'}, name = 'test';
- var def = {query: {field: {'test': field}}};
-
- assert.deepEqual((new es.query()).addField(name, field).query, def);
- },
- 'add fields chained': function() {
- var field1 = {query: 'text'}, name = 'test1',field2 = {query: 'text'}, name2 = 'test2';
- var def = {query: {field: {'test1': field1, 'test2': field2}}};
-
- var new_query = (new es.query()).addField(name, field1).addField(name2, field2);
- assert.deepEqual(new_query.query, def);
- }
-};
View
4 tests/utils.js
@@ -13,9 +13,9 @@ function testCase(suite) {
});
}
suite.tearDown = function(done) {
- //this.client.index.delete(function() {
+ this.client.index.delete(function() {
done();
- //});
+ });
}
return testCase.super_.call(this, suite);

0 comments on commit 631494d

Please sign in to comment.