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

Failed to ignore revisions in .git-blame-ignore-revs.

22 lines
435 B
JavaScript
Raw Normal View History

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