mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 14:26:12 +08:00
435761ef58
This reverts commit 10e1831139
.
29 lines
945 B
JavaScript
29 lines
945 B
JavaScript
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
|
|
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
|
import hbs from "htmlbars-inline-precompile";
|
|
import I18n from "I18n";
|
|
import { module, test } from "qunit";
|
|
import { render } from "@ember/test-helpers";
|
|
|
|
module(
|
|
"Discourse Chat | Component | chat-retention-reminder",
|
|
function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test("display retention info", async function (assert) {
|
|
this.channel = ChatChannel.create({ chatable_type: "Category" });
|
|
this.currentUser.set("needs_channel_retention_reminder", true);
|
|
|
|
await render(
|
|
hbs`<ChatRetentionReminder @chatChannel={{this.channel}} />`
|
|
);
|
|
|
|
assert.dom(".chat-retention-reminder").includesText(
|
|
I18n.t("chat.retention_reminders.public", {
|
|
count: this.siteSettings.chat_channel_retention_days,
|
|
})
|
|
);
|
|
});
|
|
}
|
|
);
|