mirror of
https://github.com/wassname/talk.git
synced 2026-07-09 21:36:00 +08:00
Add a test on already used display name.
This commit is contained in:
@@ -80,6 +80,22 @@ describe('models.User', () => {
|
||||
|
||||
});
|
||||
|
||||
describe('#createLocalUser', () => {
|
||||
it('should not create a user with duplicate display name', () => {
|
||||
return User.createLocalUsers([{
|
||||
email: 'otrostampi@gmail.com',
|
||||
displayName: 'Stampi',
|
||||
password: '1Coralito!'
|
||||
}])
|
||||
.then((user) => {
|
||||
expect(user).to.be.null;
|
||||
})
|
||||
.catch((error) => {
|
||||
expect(error).to.not.be.null;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('#createEmailConfirmToken', () => {
|
||||
|
||||
it('should create a token for a valid user', () => {
|
||||
|
||||
Reference in New Issue
Block a user