/** @overview nodeunit test case. */

var testResource = require('../../../test_resource'),
    mockInjector = require('../../../mock_injector'),
    connectSqliteDb = require('../../../../lib/db/connect_sqlite_db.js');

exports.setUp = function (done) {
    done();
};

exports.tearDown = function (done) {
    mockInjector.restoreAll();
    done();
};

exports['Hit by on condition.'] = function (test) {
    var hit = connectSqliteDb._hit;
    test.ok(!hit({}, null));
    test.ok(hit({name: {$regex: "fo."}}, {name: 'foo'}));
    test.ok(!hit({name: {$regex: "fo."}}, {name: 'bar'}));
    test.done();
};


exports['Connect sqlite db.'] = function (test) {
    test.ok(connectSqliteDb);
    test.done();
};