2023-10-11 02:38:59 +08:00
|
|
|
import { render } from "@ember/test-helpers";
|
2023-02-17 21:14:00 +08:00
|
|
|
import hbs from "htmlbars-inline-precompile";
|
|
|
|
import { module, test } from "qunit";
|
2023-10-11 02:38:59 +08:00
|
|
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
2023-02-17 21:14:00 +08:00
|
|
|
|
|
|
|
module("Discourse Chat | Component | chat-user-info", function (hooks) {
|
|
|
|
setupRenderingTest(hooks);
|
|
|
|
|
|
|
|
test("avatar and name", async function (assert) {
|
|
|
|
this.set("user", this.currentUser);
|
|
|
|
|
|
|
|
await render(hbs`<ChatUserInfo @user={{this.user}} />`);
|
|
|
|
|
2023-11-10 18:29:28 +08:00
|
|
|
assert.dom().containsText(this.user.username);
|
|
|
|
assert.dom().containsText(this.user.name);
|
2023-02-17 21:14:00 +08:00
|
|
|
});
|
|
|
|
});
|