mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-06 10:39:44 +02:00
fix a user test
This commit is contained in:
@@ -55,12 +55,12 @@ describe('User', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('should have a valid email, if using an email', function() {
|
||||
assert.throws(
|
||||
User.create({username: userData.username, password: userData.password, email: 'fakeMail'},function(){}),
|
||||
Error,
|
||||
'does not validate email'
|
||||
);
|
||||
it('should have a valid email, if using an email', function(done) {
|
||||
User.create({username: userData.username, password: userData.password, email: 'fakeMail'},function(err) {
|
||||
assert(err);
|
||||
assert.equal(err.message, '[[error:invalid-email]]');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user