diff --git a/src/controllers/security/index.js b/src/controllers/security/index.js index e8ccf1e51..5ec1e2d97 100644 --- a/src/controllers/security/index.js +++ b/src/controllers/security/index.js @@ -156,9 +156,6 @@ class SecurityController extends BaseController { } createUser (_id, body, options = {}) { - if (!_id) { - throw new Error('Kuzzle.security.createUser: _id is required'); - } if (!body) { throw new Error('Kuzzle.security.createUser: body is required'); } diff --git a/test/controllers/security.test.js b/test/controllers/security.test.js index ad578f129..23c185347 100644 --- a/test/controllers/security.test.js +++ b/test/controllers/security.test.js @@ -429,18 +429,6 @@ describe('Security Controller', () => { }); describe('createUser', () => { - it('should throw an error if the "_id" argument is not provided', () => { - const body = { - content: {foo: 'bar'}, - credentials: { - strategy: {foo: 'bar'} - } - }; - should(function () { - kuzzle.security.createUser(undefined, body, options); - }).throw('Kuzzle.security.createUser: _id is required'); - }); - it('should throw an error if the "body" argument is not provided', () => { should(function () { kuzzle.security.createUser('userId', undefined, options);