mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-27 10:35:36 +08:00
This was required in older versions of Ember. But now, bare template tags can access `this.`. This commit was created by upgrading lint-configs, and then running `pnpm lint:js:fix && pnpm lint:prettier:fix` Rule development: https://github.com/discourse/lint-configs/pull/154
22 lines
687 B
Text
Vendored
22 lines
687 B
Text
Vendored
import { render } from "@ember/test-helpers";
|
|
import { module, test } from "qunit";
|
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
|
import ChatEmojiAvatar from "discourse/plugins/chat/discourse/components/chat-emoji-avatar";
|
|
|
|
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(
|
|
<template><ChatEmojiAvatar @emoji={{this.emoji}} /></template>
|
|
);
|
|
|
|
assert
|
|
.dom(
|
|
".chat-emoji-avatar .chat-emoji-avatar-container .emoji[title=otter]"
|
|
)
|
|
.exists();
|
|
});
|
|
});
|