X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fpleroma%2Fuser%2Fwelcome_chat_message_test.exs;h=42a45fa1988f6b90589d94db358a0420c872b61c;hb=1ecdb19de5fa54119c6a744c766bbd6c77d1b746;hp=fe26d6e4d869c2db0f479a754988b055f7152091;hpb=b3d6cf90229ff3e9a5bd0028d4a6cbd3b68da9fe;p=akkoma
diff --git a/test/pleroma/user/welcome_chat_message_test.exs b/test/pleroma/user/welcome_chat_message_test.exs
index fe26d6e4d..42a45fa19 100644
--- a/test/pleroma/user/welcome_chat_message_test.exs
+++ b/test/pleroma/user/welcome_chat_message_test.exs
@@ -1,11 +1,10 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.User.WelcomeChatMessageTest do
use Pleroma.DataCase
- alias Pleroma.Config
alias Pleroma.User.WelcomeChatMessage
import Pleroma.Factory
@@ -17,10 +16,10 @@ defmodule Pleroma.User.WelcomeChatMessageTest do
welcome_user = insert(:user, name: "mewmew")
user = insert(:user)
- Config.put([:welcome, :chat_message, :enabled], true)
- Config.put([:welcome, :chat_message, :sender_nickname], welcome_user.nickname)
+ clear_config([:welcome, :chat_message, :enabled], true)
+ clear_config([:welcome, :chat_message, :sender_nickname], welcome_user.nickname)
- Config.put(
+ clear_config(
[:welcome, :chat_message, :message],
"Hello, welcome to Blob/Cat!"
)
@@ -28,8 +27,10 @@ defmodule Pleroma.User.WelcomeChatMessageTest do
{:ok, %Pleroma.Activity{} = activity} = WelcomeChatMessage.post_message(user)
assert user.ap_id in activity.recipients
- assert Pleroma.Object.normalize(activity).data["type"] == "ChatMessage"
- assert Pleroma.Object.normalize(activity).data["content"] == "Hello, welcome to Blob/Cat!"
+ assert Pleroma.Object.normalize(activity, fetch: false).data["type"] == "ChatMessage"
+
+ assert Pleroma.Object.normalize(activity, fetch: false).data["content"] ==
+ "Hello, welcome to Blob/Cat!"
end
end
end