diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-10-29 22:23:19 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-10-29 22:23:19 +0300 |
commit | b27a92e8faacb25540f08e32f68f37555a889aff (patch) | |
tree | e496b859774953b644008bd7d831b65d25bc7617 /test/web/admin_api | |
parent | 922e3d082c38ccd108710e21d4bda8e65b551f9c (diff) | |
parent | eba8acff094cd63088f74424f14c9d807bb8e862 (diff) | |
download | pleroma-b27a92e8faacb25540f08e32f68f37555a889aff.tar.gz |
Merge branch 'develop' into issue/1276
Diffstat (limited to 'test/web/admin_api')
-rw-r--r-- | test/web/admin_api/admin_api_controller_test.exs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs index 58435d23c..22c989892 100644 --- a/test/web/admin_api/admin_api_controller_test.exs +++ b/test/web/admin_api/admin_api_controller_test.exs @@ -2572,22 +2572,20 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do end test "GET /relay", %{admin: admin} do - 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() + relay_user = Pleroma.Web.ActivityPub.Relay.get_actor() + + ["http://mastodon.example.org/users/admin", "https://mstdn.io/users/mayuutann"] + |> Enum.each(fn ap_id -> + {:ok, user} = User.get_or_fetch_by_ap_id(ap_id) + User.follow(relay_user, user) + end) conn = build_conn() |> assign(:user, admin) |> get("/api/pleroma/admin/relay") - assert json_response(conn, 200)["relays"] -- ["test-app.com", "test-app-42.com"] == [] + assert json_response(conn, 200)["relays"] -- ["mastodon.example.org", "mstdn.io"] == [] end test "DELETE /relay", %{admin: admin} do |