aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-06-30 09:08:46 +0000
committerrinpatch <rinpatch@sdf.org>2019-06-30 09:08:46 +0000
commit66380d36d540751f59445c8a65e9747ce5475ee5 (patch)
tree23229cd723f7a06de999db05d66482bb0debe2d4 /test
parente5df6487c8a8c1df45d4ff324ed04783d851dd5d (diff)
parent1f76740e104e6b5f50fbb813b5d7b42499eb3466 (diff)
downloadpleroma-66380d36d540751f59445c8a65e9747ce5475ee5.tar.gz
Merge branch 'filter-user-statuses-by-hashtag' into 'develop'
Add hashtag filter to user statuses (GET /api/v1/accounts/:id/statuses) Closes #974 See merge request pleroma/pleroma!1362
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 03f57dbfa..b7487c68c 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -1408,6 +1408,19 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
assert [%{"id" => id}] = json_response(conn, 200)
assert id == to_string(post.id)
end
+
+ test "filters user's statuses by a hashtag", %{conn: conn} do
+ user = insert(:user)
+ {:ok, post} = CommonAPI.post(user, %{"status" => "#hashtag"})
+ {:ok, _post} = CommonAPI.post(user, %{"status" => "hashtag"})
+
+ conn =
+ conn
+ |> get("/api/v1/accounts/#{user.id}/statuses", %{"tagged" => "hashtag"})
+
+ assert [%{"id" => id}] = json_response(conn, 200)
+ assert id == to_string(post.id)
+ end
end
describe "user relationships" do