diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2019-06-30 21:23:35 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2019-06-30 21:23:35 +0300 |
commit | d2cb18b2a342b990cc47dfdc42adb843c3db1b5e (patch) | |
tree | 2982108b486fe8361fba5f22c53491bb265924b4 /test/web/mastodon_api/mastodon_api_controller_test.exs | |
parent | 657277ffc0d3d25be4376ed629057a2d2cefb2e1 (diff) | |
parent | 66380d36d540751f59445c8a65e9747ce5475ee5 (diff) | |
download | pleroma-d2cb18b2a342b990cc47dfdc42adb843c3db1b5e.tar.gz pleroma-d2cb18b2a342b990cc47dfdc42adb843c3db1b5e.zip |
Merge branch 'develop' into feature/digest-email
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 13 |
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 |