mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
23 lines
734 B
JavaScript
23 lines
734 B
JavaScript
|
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'
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
});
|