Permalink
Browse files

Deleted old tests

  • Loading branch information...
1 parent aab47db commit bb758d344f0a29ee9a0152956029467fc5c631c2 @sergi committed Oct 26, 2009
Showing with 0 additions and 62 deletions.
  1. +0 −10 tests/cursor-test.js
  2. +0 −52 tests/mongodb-test.js
View
10 tests/cursor-test.js
@@ -1,10 +0,0 @@
-var MongoDB = require("mongodb");
-var db = new MongoDB.Mongo("test", "localhost" , 27017);
-var coll = db.getCollection("test") ;
-var cur = coll.find();
-
-while(cur.hasNext()) {
- print(cur.next());
-}
-
-print("$$$$ "+cur.explain());
View
52 tests/mongodb-test.js
@@ -1,52 +0,0 @@
-/*include("helma/unittest");
-include('../db');
-var log = require("helma/logging").getLogger(__name__);
-
-export('testCase');
-
-var testCase = new TestCase('mongo/tests/db_test');
-var dbname = "helmatest";
-
-testCase.testBasics = function() {
- var db = new MongoDB(dbname);
- var secondDB = new MongoDB(dbname);
- assertEqual(db, secondDB); // make sure we're not creating duplicate db objects
-
- var first = db.coll('first');
- first.drop();
- assertEqual(first.getName(), 'first');
- assertEqual(first.find().length(), 0); // should be empty at first
-
- var saved = first.save({test:21});
- assertEqual(saved.test, 21);
-
- var found = first.findOne(); // should only be one in there
- assertEqual(found.test, 21);
-
- assertEqual(db.getCollectionNames()[0], 'first');
-
- first.ensureIDIndex();
- var idxs = first.getIndexInfo();
- assertEqual(idxs[0].name, '_id_1' );
-
- first.drop();
-}
-
-testCase.testLoading = function() {
- var load = new MongoDB(dbname).coll('load');
- load.ensureIDIndex();
- var count = 10000;
- var docs = [];
- for(var i = 0; i < count; i++)
- docs.push({small:123});
- load.insert(docs);
-
- assertTrue(load.find().length() >= count);
- assertEqual(load.find().limit(50).length(), 50);
-
- load.drop();
-}
-
-var mon = require('mongodb');
-var m = new mon.Mongo(null, null, "test");
-*/

0 comments on commit bb758d3

Please sign in to comment.