DEV: update test to use new chat message service (#254)
Update test to use the new chat update message service when editing chat messages.
This commit is contained in:
parent
abd3da3383
commit
cda5cb6e9c
|
@ -52,15 +52,15 @@ describe DiscourseAi::Toxicity::EntryPoint do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
xcontext "when editing a chat message" do
|
context "when editing a chat message" do
|
||||||
# This fabricator trigger events because it uses the MessageCreator.
|
# This fabricator trigger events because it uses the UpdateMessage service.
|
||||||
# Using let makes the test fail.
|
# Using let makes the test fail.
|
||||||
fab!(:chat_message) { Fabricate(:chat_message) }
|
fab!(:chat_message) { Fabricate(:chat_message) }
|
||||||
let(:updater) do
|
let(:updater) do
|
||||||
Chat::MessageUpdater.new(
|
Chat::UpdateMessage.call(
|
||||||
guardian: Guardian.new(chat_message.user),
|
guardian: Guardian.new(chat_message.user),
|
||||||
chat_message: chat_message,
|
message_id: chat_message.id,
|
||||||
new_content: "This is my updated message",
|
message: "This is my updated message",
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue