mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
renamed groupname
This commit is contained in:
@@ -187,10 +187,14 @@ describe('Groups', function() {
|
|||||||
|
|
||||||
describe('.update()', function() {
|
describe('.update()', function() {
|
||||||
before(function(done) {
|
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) {
|
it('should change an aspect of a group', function(done) {
|
||||||
Groups.update('foo', {
|
Groups.update('updateTestGroup', {
|
||||||
description: 'baz'
|
description: 'baz'
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err) return done(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) {
|
it('should rename a group if the name was updated', function(done) {
|
||||||
Groups.update('foo', {
|
Groups.update('updateTestGroup', {
|
||||||
name: 'foobar?'
|
name: 'updateTestGroup?'
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
if (err) return done(err);
|
if (err) return done(err);
|
||||||
|
|
||||||
Groups.get('foobar?', {}, function(err, groupObj) {
|
Groups.get('foobar?', {}, function(err, groupObj) {
|
||||||
if (err) return done(err);
|
if (err) return done(err);
|
||||||
|
|
||||||
assert.strictEqual('foobar?', groupObj.name);
|
assert.strictEqual('updateTestGroup?', groupObj.name);
|
||||||
assert.strictEqual('foobar', groupObj.slug);
|
assert.strictEqual('updateTestGroup', groupObj.slug);
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user