mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 21:08:03 +08:00
Retry: Rename all test files from JS -> ES6
This commit is contained in:
21
test/javascripts/models/group-test.js
Normal file
21
test/javascripts/models/group-test.js
Normal file
@ -0,0 +1,21 @@
|
||||
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"
|
||||
);
|
||||
});
|
Reference in New Issue
Block a user