renamed groupname

v1.18.x
barisusakli 10 years ago
parent 649ef93768
commit e5bea19f56

@ -187,10 +187,14 @@ describe('Groups', function() {
describe('.update()', function() {
before(function(done) {
Groups.join('foo', 1, done);
Groups.create({
name: 'updateTestGroup',
description: 'bar'
}, done);
});
it('should change an aspect of a group', function(done) {
Groups.update('foo', {
Groups.update('updateTestGroup', {
description: 'baz'
}, function(err) {
if (err) return done(err);
@ -206,16 +210,16 @@ describe('Groups', function() {
});
it('should rename a group if the name was updated', function(done) {
Groups.update('foo', {
name: 'foobar?'
Groups.update('updateTestGroup', {
name: 'updateTestGroup?'
}, function(err) {
if (err) return done(err);
Groups.get('foobar?', {}, function(err, groupObj) {
if (err) return done(err);
assert.strictEqual('foobar?', groupObj.name);
assert.strictEqual('foobar', groupObj.slug);
assert.strictEqual('updateTestGroup?', groupObj.name);
assert.strictEqual('updateTestGroup', groupObj.slug);
done();
});

Loading…
Cancel
Save