Skip to content

Node.js based forum software built for the modern web

renamed groupname

barisusaklie5bea19f5637
diff --git a/tests/groups.js b/tests/groups.js
index ff057d8b99..9c122f7883 100644
--- a/tests/groups.js
+++ b/tests/groups.js
@@ -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();
});