Allow usernames and groupnames of length 1

Fixes #204
This commit is contained in:
Girish Ramakrishnan
2017-02-02 00:23:11 -08:00
parent cd31e12bec
commit 7efb6d60bc
6 changed files with 17 additions and 20 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ describe('Groups', function () {
after(cleanup);
it('cannot create group - too small', function (done) {
groups.create('a', function (error) {
groups.create('', function (error) {
expect(error.reason).to.be(GroupError.BAD_FIELD);
done();
});
+1 -1
View File
@@ -162,7 +162,7 @@ describe('User', function () {
});
it('fails due to short username', function (done) {
user.create('Z', PASSWORD, EMAIL, DISPLAY_NAME, AUDIT_SOURCE, function (error, result) {
user.create('', PASSWORD, EMAIL, DISPLAY_NAME, AUDIT_SOURCE, function (error, result) {
expect(error).to.be.ok();
expect(result).to.not.be.ok();
expect(error.reason).to.equal(UserError.BAD_FIELD);