mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
#33 Added unit test for createdBy
This commit is contained in:
parent
69af3d1832
commit
ae444039b1
@ -36,6 +36,22 @@ describe('The features api', function () {
|
||||
.expect(201, done);
|
||||
});
|
||||
|
||||
it('creates new feature toggle with createdBy', function (done) {
|
||||
request
|
||||
.post('/features')
|
||||
.send({name: 'com.test.Username', enabled: false})
|
||||
.set('Cookie', ['username=ivaosthu'])
|
||||
.set('Content-Type', 'application/json')
|
||||
.end(function(){
|
||||
request
|
||||
.get('/events')
|
||||
.end(function (err, res) {
|
||||
assert.equal(res.body.events[0].createdBy, 'ivaosthu');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('require new feature toggle to have a name', function (done) {
|
||||
request
|
||||
.post('/features')
|
||||
@ -72,4 +88,4 @@ describe('The features api', function () {
|
||||
.expect(404, done);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user