Files
Jarek RadoszandGitHub 5d8ddf8f4b DEV: Clean up imports (#28060)
* `@ember/owner` instead of `@ember/application`
* `discourse-i18n` instead of `I18n`
* `{ service } from "@ember/service"` instead of `inject as service`
2024-07-25 15:09:06 +02:00

30 lines
674 B
JavaScript

import { getOwner } from "@ember/owner";
import { setupTest } from "ember-qunit";
import { module, test } from "qunit";
module("Unit | Model | group", function (hooks) {
setupTest(hooks);
test("displayName", function (assert) {
const store = getOwner(this).lookup("service:store");
const group = store.createRecord("group", {
name: "test",
display_name: "donkey",
});
assert.strictEqual(
group.displayName,
"donkey",
"it should return the display name"
);
group.set("display_name", null);
assert.strictEqual(
group.displayName,
"test",
"it should return the group's name"
);
});
});