mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-01 01:49:01 +02:00
added two failing tests for #1331
This commit is contained in:
@@ -71,6 +71,15 @@ describe('Groups', function() {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should auto-generate a slug given the group name', function(done) {
|
||||
Groups.get('Test', {}, function(err, groupObj) {
|
||||
if (err) return done(err);
|
||||
|
||||
assert.strictEqual('test', groupObj.slug);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('.search()', function() {
|
||||
@@ -158,6 +167,14 @@ describe('Groups', function() {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should also check slugified name for existence', function(done) {
|
||||
Groups.exists('Test();', function(err, exists) {
|
||||
if (err) return done(err);
|
||||
|
||||
assert.strictEqual(exists, true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('.create()', function() {
|
||||
|
||||
Reference in New Issue
Block a user