1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/unleash-server/test/eventStoreSpec.js

25 lines
747 B
JavaScript
Raw Normal View History

var assert = require('assert');
2014-10-22 16:53:15 +02:00
var eventType = require('../lib/eventType');
2014-10-22 16:26:36 +02:00
var eventStore = require('../lib/eventStore');
2014-10-22 16:26:36 +02:00
describe('EventStore', function () {
describe('#create()', function () {
it('should emit event', function (done) {
2014-10-22 16:53:15 +02:00
eventStore.once(eventType.featureCreated, function (x) {
assert(x);
done();
}
);
2014-10-22 16:53:15 +02:00
var eventData = {
'name': 'mail-server.validate-email-addresses',
'enabled': false,
'strategy': 'default',
'description': 'Feature description'
2014-10-22 16:53:15 +02:00
};
2014-10-22 17:09:50 +02:00
eventStore.create(eventType.featureCreated,'ole',eventData);
});
});
});