discourse/test/javascripts/models/group-test.js.es6

13 lines
397 B
Plaintext
Raw Normal View History

import Group from 'discourse/models/group';
2017-06-15 01:57:58 +08:00
QUnit.module("model:group");
2017-06-15 01:57:58 +08:00
QUnit.test('displayName', assert => {
const group = Group.create({ name: "test", display_name: 'donkey' });
2017-06-15 01:57:58 +08:00
assert.ok(group.get('displayName'), "donkey", 'it should return the display name');
group.set('display_name', null);
2017-06-15 01:57:58 +08:00
assert.ok(group.get('displayName'), "test", "it should return the group's name");
});