summaryrefslogtreecommitdiff
path: root/test/tasks/relay_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-08-19 14:36:10 +0000
committerlain <lain@soykaf.club>2019-08-19 14:36:10 +0000
commit49ae3191df2a7acfa741e93d6f5142f9cf27dc06 (patch)
tree3551b826ae23b53ac30d740f49802d1c78ea2bc3 /test/tasks/relay_test.exs
parent608773c5efa592167930294da2aeb3931556aa08 (diff)
parente652cef76b99588867315347e8dcc3d323d8a161 (diff)
downloadpleroma-49ae3191df2a7acfa741e93d6f5142f9cf27dc06.tar.gz
pleroma-49ae3191df2a7acfa741e93d6f5142f9cf27dc06.zip
Merge branch 'hotfix/user_unfollow' into 'develop'
[#1177] fixed User.unfollow with synchronization external user See merge request pleroma/pleroma!1579
Diffstat (limited to 'test/tasks/relay_test.exs')
-rw-r--r--test/tasks/relay_test.exs23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/tasks/relay_test.exs b/test/tasks/relay_test.exs
index 9d260da3e..0d341c8d6 100644
--- a/test/tasks/relay_test.exs
+++ b/test/tasks/relay_test.exs
@@ -69,4 +69,27 @@ defmodule Mix.Tasks.Pleroma.RelayTest do
assert undo_activity.data["object"] == cancelled_activity.data
end
end
+
+ describe "mix pleroma.relay list" do
+ test "Prints relay subscription list" do
+ :ok = Mix.Tasks.Pleroma.Relay.run(["list"])
+
+ refute_receive {:mix_shell, :info, _}
+
+ Pleroma.Web.ActivityPub.Relay.get_actor()
+ |> Ecto.Changeset.change(
+ following: [
+ "http://test-app.com/user/test1",
+ "http://test-app.com/user/test1",
+ "http://test-app-42.com/user/test1"
+ ]
+ )
+ |> Pleroma.User.update_and_set_cache()
+
+ :ok = Mix.Tasks.Pleroma.Relay.run(["list"])
+
+ assert_receive {:mix_shell, :info, ["test-app.com"]}
+ assert_receive {:mix_shell, :info, ["test-app-42.com"]}
+ end
+ end
end