diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-01-10 16:44:28 +0100 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2019-01-26 04:46:02 +0100 |
commit | 5a84def6a6cd6ac782e16b2aace220a99c31ace7 (patch) | |
tree | c397e00c7cc03a01a5db44a68f695339fb355ee5 /test/web/mastodon_api/mastodon_api_controller_test.exs | |
parent | 4ad0ad14ed2d8a10bbf642fd989b3f7f55f9017d (diff) | |
download | pleroma-5a84def6a6cd6ac782e16b2aace220a99c31ace7.tar.gz pleroma-5a84def6a6cd6ac782e16b2aace220a99c31ace7.zip |
Fix the logic in multi-hashtag TLs
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index be868c081..b4870e0b2 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -1051,11 +1051,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do {:ok, activity_test1} = CommonAPI.post(user, %{"status" => "#test1"}) {:ok, activity_none} = CommonAPI.post(user, %{"status" => "#test #none"}) - all_test = + any_test = conn - |> get("/api/v1/timelines/tag/test", %{"all" => ["test1"]}) + |> get("/api/v1/timelines/tag/test", %{"any" => ["none"]}) - assert [status_none, status_test1, status_test] = json_response(all_test, 200) + [status_none, status_test1, status_test] = json_response(any_test, 200) assert to_string(activity_test.id) == status_test["id"] assert to_string(activity_test1.id) == status_test1["id"] @@ -1066,6 +1066,10 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do |> get("/api/v1/timelines/tag/test", %{"all" => ["test1"], "none" => ["none"]}) assert [status_test1, status_test] == json_response(restricted_test, 200) + + all_test = conn |> get("/api/v1/timelines/tag/test", %{"all" => ["none"]}) + + assert [status_none] == json_response(all_test, 200) end test "getting followers", %{conn: conn} do |