X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fpleroma%2Fuser%2Fwelcome_message_test.exs;h=28afde94302383099243d5ba2182920498d9f693;hb=f9ae7e72e9d745a1174353814d0ae6774f36ba3f;hp=3cd6f5cb78e9254c61353987f5cb8a616493a543;hpb=c4c5caedd809e46542ae3632762d93f14890d51d;p=akkoma
diff --git a/test/pleroma/user/welcome_message_test.exs b/test/pleroma/user/welcome_message_test.exs
index 3cd6f5cb7..28afde943 100644
--- a/test/pleroma/user/welcome_message_test.exs
+++ b/test/pleroma/user/welcome_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.WelcomeMessageTest do
use Pleroma.DataCase
- alias Pleroma.Config
alias Pleroma.User.WelcomeMessage
import Pleroma.Factory
@@ -17,10 +16,10 @@ defmodule Pleroma.User.WelcomeMessageTest do
welcome_user = insert(:user)
user = insert(:user, name: "Jimm")
- Config.put([:welcome, :direct_message, :enabled], true)
- Config.put([:welcome, :direct_message, :sender_nickname], welcome_user.nickname)
+ clear_config([:welcome, :direct_message, :enabled], true)
+ clear_config([:welcome, :direct_message, :sender_nickname], welcome_user.nickname)
- Config.put(
+ clear_config(
[:welcome, :direct_message, :message],
"Hello. Welcome to Pleroma"
)
@@ -28,7 +27,9 @@ defmodule Pleroma.User.WelcomeMessageTest do
{:ok, %Pleroma.Activity{} = activity} = WelcomeMessage.post_message(user)
assert user.ap_id in activity.recipients
assert activity.data["directMessage"] == true
- assert Pleroma.Object.normalize(activity).data["content"] =~ "Hello. Welcome to Pleroma"
+
+ assert Pleroma.Object.normalize(activity, fetch: false).data["content"] =~
+ "Hello. Welcome to Pleroma"
end
end
end