Web.MastodonAPI.MastodonAPIControllerTest: Update for difference between all and any parameters

This commit is contained in:
Haelwenn (lanodan) Monnier 2019-01-22 15:42:46 +01:00
parent 5a84def6a6
commit 22f2687f17
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE

View File

@ -1048,12 +1048,12 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
user = insert(:user) user = insert(:user)
{:ok, activity_test} = CommonAPI.post(user, %{"status" => "#test"}) {:ok, activity_test} = CommonAPI.post(user, %{"status" => "#test"})
{:ok, activity_test1} = CommonAPI.post(user, %{"status" => "#test1"}) {:ok, activity_test1} = CommonAPI.post(user, %{"status" => "#test #test1"})
{:ok, activity_none} = CommonAPI.post(user, %{"status" => "#test #none"}) {:ok, activity_none} = CommonAPI.post(user, %{"status" => "#test #none"})
any_test = any_test =
conn conn
|> get("/api/v1/timelines/tag/test", %{"any" => ["none"]}) |> get("/api/v1/timelines/tag/test", %{"any" => ["test1"]})
[status_none, status_test1, status_test] = json_response(any_test, 200) [status_none, status_test1, status_test] = json_response(any_test, 200)
@ -1065,7 +1065,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
conn conn
|> get("/api/v1/timelines/tag/test", %{"all" => ["test1"], "none" => ["none"]}) |> get("/api/v1/timelines/tag/test", %{"all" => ["test1"], "none" => ["none"]})
assert [status_test1, status_test] == json_response(restricted_test, 200) assert [status_test1] == json_response(restricted_test, 200)
all_test = conn |> get("/api/v1/timelines/tag/test", %{"all" => ["none"]}) all_test = conn |> get("/api/v1/timelines/tag/test", %{"all" => ["none"]})