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

23 lines
734 B
JavaScript
Raw Normal View History

var assert = require('assert');
var events = require('../lib/events');
var EventRepository = require('../lib/eventRepository');
var eventRepository = new EventRepository();
describe('EventRepository', function () {
describe('#create()', function () {
it('should emit event', function (done) {
eventRepository.on(events.featureCreated, function (x) {
assert(x);
done();
}
);
eventRepository.create({
'name': 'mail-server.validate-email-addresses',
'enabled': false,
'strategy': 'default',
'description': 'Feature description'
});
});
});
});