X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Fstreamer_test.exs;h=dd210c3b5022ce7d20350f303685878580f53bbf;hb=e73d878b381f28abbd50e3d4e4894ff56669231d;hp=395016da2a8eb9f11d962fe37bf2b7aa3a2fe4af;hpb=24ce3249736c96686c00a10abe47659579535259;p=akkoma diff --git a/test/pleroma/web/streamer_test.exs b/test/pleroma/web/streamer_test.exs index 395016da2..dd210c3b5 100644 --- a/test/pleroma/web/streamer_test.exs +++ b/test/pleroma/web/streamer_test.exs @@ -29,6 +29,14 @@ defmodule Pleroma.Web.StreamerTest do assert {:ok, "public:local:media"} = Streamer.get_topic("public:local:media", nil, nil) end + test "allows instance streams" do + assert {:ok, "public:remote:lain.com"} = + Streamer.get_topic("public:remote", nil, nil, %{"instance" => "lain.com"}) + + assert {:ok, "public:remote:media:lain.com"} = + Streamer.get_topic("public:remote:media", nil, nil, %{"instance" => "lain.com"}) + end + test "allows hashtag streams" do assert {:ok, "hashtag:cofe"} = Streamer.get_topic("hashtag", nil, nil, %{"tag" => "cofe"}) end @@ -214,7 +222,7 @@ defmodule Pleroma.Web.StreamerTest do data = File.read!("test/fixtures/mastodon-announce.json") - |> Poison.decode!() + |> Jason.decode!() |> Map.put("object", activity.data["object"]) |> Map.put("actor", user.ap_id)