[#161] Merge remote-tracking branch 'remotes/upstream/develop' into 161-incoming-replies-depth-limit
# Conflicts: # CHANGELOG.md
This commit is contained in:
commit
a799418573
9 changed files with 86 additions and 8 deletions
|
|
@ -188,6 +188,11 @@ defmodule Pleroma.Web.CommonAPITest do
|
|||
assert %User{info: %{pinned_activities: [^id]}} = user
|
||||
end
|
||||
|
||||
test "unlisted statuses can be pinned", %{user: user} do
|
||||
{:ok, activity} = CommonAPI.post(user, %{"status" => "HI!!!", "visibility" => "unlisted"})
|
||||
assert {:ok, ^activity} = CommonAPI.pin(activity.id, user)
|
||||
end
|
||||
|
||||
test "only self-authored can be pinned", %{activity: activity} do
|
||||
user = insert(:user)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue