boobst
Version:
Simple Node.js Caché driver
66 lines (54 loc) • 1.6 kB
JavaScript
// Generated by CoffeeScript 1.7.1
/*
* @author Andrew D.Laptev <a.d.laptev@gmail.com>
*/
/*global describe, beforeEach, afterEach, it */
(function() {
var BoobstSocket, GLOBAL, assert, boobst;
assert = require('assert');
boobst = require('../boobst');
BoobstSocket = boobst.BoobstSocket;
GLOBAL = '^testKILL';
describe('kill', function() {
var bs;
this.timeout(15000);
bs = new BoobstSocket(require('./test.config'));
beforeEach(function(done) {
return bs.connect(function(err) {
if (err) {
throw err;
}
return done();
});
});
afterEach(function(done) {
return bs.disconnect(function() {
return done();
});
});
return describe('#get-set-get-kill-get', function() {
var value;
value = 'hello';
return it('should properly switch between namespaces', function(done) {
return bs.get(GLOBAL, function(err, data) {
assert.notEqual(err, null);
return bs.set(GLOBAL, value, function(err) {
assert.equal(err, null);
return bs.get(GLOBAL, function(err, data) {
assert.equal(err, null);
assert.equal(data, value);
return bs.kill(GLOBAL, function(err) {
assert.equal(err, null);
return bs.get(GLOBAL, function(err) {
assert.notEqual(err, null);
return done();
});
});
});
});
});
});
});
});
}).call(this);
//# sourceMappingURL=test.kill.map