Fix group name validation to not allow hyphen

Fixes #70
This commit is contained in:
Girish Ramakrishnan
2016-09-30 12:25:42 -07:00
parent f71b55c9e2
commit ba588a1cd7
4 changed files with 16 additions and 5 deletions

View File

@@ -82,6 +82,13 @@ describe('Groups', function () {
});
});
it('cannot create group - invalid', function (done) {
groups.create('cloudron-admin', function (error) {
expect(error.reason).to.be(GroupError.BAD_FIELD);
done();
});
});
it('can create valid group', function (done) {
groups.create(GROUP0_NAME, function (error, result) {
expect(error).to.be(null);