Move username and email lowercasing to where it belongs

Fixes #592
This commit is contained in:
Johannes Zellner
2016-04-14 16:25:46 +02:00
parent 9f443e2d07
commit 101ce62ef3
4 changed files with 19 additions and 31 deletions

View File

@@ -69,18 +69,6 @@ describe('database', function () {
displayName: 'Herbert 2'
};
var USER_3 = {
id: 'uuid3',
username: 'uuid3',
password: 'secret',
email: 'SAFE3@me.com',
salt: 'tata',
createdAt: 'sometime back',
modifiedAt: 'now',
resetToken: '',
displayName: 'Herbert 3'
};
it('can add user', function (done) {
userdb.add(USER_0.id, USER_0, done);
});
@@ -101,14 +89,6 @@ describe('database', function () {
});
});
it('cannot add user with same but uppercase email again', function (done) {
userdb.add(USER_3.id, USER_3, function (error) {
expect(error).to.be.ok();
expect(error.reason).to.be(DatabaseError.ALREADY_EXISTS);
done();
});
});
it('can get by user id', function (done) {
userdb.get(USER_0.id, function (error, user) {
expect(error).to.not.be.ok();