X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=inline;f=test%2Factivity_test.exs;h=e7ea2bd5e91b852b564867428eba229ff866db37;hb=a7287e2e3a9291469c489a5a1df26480fdeab3a3;hp=275cab81e6123a839ed044e5a5cc2642f2360040;hpb=d7457c9165b83c0f1514cf0532b5a8bdc515ea02;p=akkoma
diff --git a/test/activity_test.exs b/test/activity_test.exs
index 275cab81e..e7ea2bd5e 100644
--- a/test/activity_test.exs
+++ b/test/activity_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors
+# Copyright © 2017-2019 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.ActivityTest do
@@ -7,6 +7,7 @@ defmodule Pleroma.ActivityTest do
alias Pleroma.Activity
alias Pleroma.Bookmark
alias Pleroma.Object
+ alias Pleroma.Tests.ObanHelpers
alias Pleroma.ThreadMute
import Pleroma.Factory
@@ -125,8 +126,25 @@ defmodule Pleroma.ActivityTest do
}
{:ok, local_activity} = Pleroma.Web.CommonAPI.post(user, %{"status" => "find me!"})
- {:ok, remote_activity} = Pleroma.Web.Federator.incoming_ap_doc(params)
- %{local_activity: local_activity, remote_activity: remote_activity, user: user}
+ {:ok, japanese_activity} = Pleroma.Web.CommonAPI.post(user, %{"status" => "æ´æ°æ
å ±"})
+ {:ok, job} = Pleroma.Web.Federator.incoming_ap_doc(params)
+ {:ok, remote_activity} = ObanHelpers.perform(job)
+
+ %{
+ japanese_activity: japanese_activity,
+ local_activity: local_activity,
+ remote_activity: remote_activity,
+ user: user
+ }
+ end
+
+ test "finds utf8 text in statuses", %{
+ japanese_activity: japanese_activity,
+ user: user
+ } do
+ activities = Activity.search(user, "æ´æ°æ
å ±")
+
+ assert [^japanese_activity] = activities
end
test "find local and remote statuses for authenticated users", %{