Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/controllers/security/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
12 changes: 0 additions & 12 deletions test/controllers/security.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down