summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2017-11-14 15:50:23 +0200
committereal <eal@waifu.club>2017-11-14 15:54:50 +0200
commit06c3ee3bac9abe5a369364743143618c473eb7a9 (patch)
tree3581072ac792355bddfb7768035b5a3c45bb467d /test
parentc84723b67956f731801c98a1335128d8cdbf9291 (diff)
downloadpleroma-06c3ee3bac9abe5a369364743143618c473eb7a9.tar.gz
pleroma-06c3ee3bac9abe5a369364743143618c473eb7a9.zip
Accept 1 as true.
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 1b8709941..a00a11f8b 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -261,7 +261,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
{:ok, image_post} = TwitterAPI.create_status(user, %{"status" => "cofe", "media_ids" => [media["media_id"]]})
conn = conn
- |> get("/api/v1/accounts/#{user.id}/statuses", %{"only_media" => true})
+ |> get("/api/v1/accounts/#{user.id}/statuses", %{"only_media" => "true"})
+
+ assert [%{"id" => id}] = json_response(conn, 200)
+ assert id == to_string(image_post.id)
+
+ conn = build_conn()
+ |> get("/api/v1/accounts/#{user.id}/statuses", %{"only_media" => "1"})
assert [%{"id" => id}] = json_response(conn, 200)
assert id == to_string(image_post.id)