mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 10:54:22 +08:00
14 lines
404 B
JavaScript
14 lines
404 B
JavaScript
import Group from 'discourse/models/group';
|
|
|
|
QUnit.module("model:group");
|
|
|
|
QUnit.test('displayName', assert => {
|
|
const group = Group.create({ name: "test", display_name: 'donkey' });
|
|
|
|
assert.equal(group.get('displayName'), "donkey", 'it should return the display name');
|
|
|
|
group.set('display_name', null);
|
|
|
|
assert.equal(group.get('displayName'), "test", "it should return the group's name");
|
|
});
|