mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 11:53:40 +08:00
21 lines
612 B
JavaScript
21 lines
612 B
JavaScript
import { render } from "@ember/test-helpers";
|
|
import hbs from "htmlbars-inline-precompile";
|
|
import { module, test } from "qunit";
|
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
|
|
|
module("Discourse Chat | Component | chat-emoji-avatar", function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test("uses an emoji as avatar", async function (assert) {
|
|
this.set("emoji", ":otter:");
|
|
|
|
await render(hbs`<ChatEmojiAvatar @emoji={{this.emoji}} />`);
|
|
|
|
assert
|
|
.dom(
|
|
".chat-emoji-avatar .chat-emoji-avatar-container .emoji[title=otter]"
|
|
)
|
|
.exists();
|
|
});
|
|
});
|