|
|
|
@ -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() {
|
|
|
|
|