mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Remove chat_channel_id from chat-live-pane details (#20302)
This is unnecessary indirection, we can just have the chat_channel_id in the message serializer and use that.
This commit is contained in:
@ -8,9 +8,8 @@ module("Discourse Chat | Unit | Helpers | format-chat-date", function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test("link to chat message", async function (assert) {
|
||||
this.set("details", { chat_channel_id: 1 });
|
||||
this.set("message", { id: 1 });
|
||||
await render(hbs`{{format-chat-date this.message this.details}}`);
|
||||
this.set("message", { id: 1, chat_channel_id: 1 });
|
||||
await render(hbs`{{format-chat-date this.message}}`);
|
||||
|
||||
assert.equal(query(".chat-time").getAttribute("href"), "/chat/c/-/1/1");
|
||||
});
|
||||
|
Reference in New Issue
Block a user