aboutsummaryrefslogtreecommitdiff
path: root/test/web
diff options
context:
space:
mode:
authorkaniini <ariadne@dereferenced.org>2019-07-29 16:28:53 +0000
committerkaniini <ariadne@dereferenced.org>2019-07-29 16:28:53 +0000
commitce6dfb6f066616553d8594fd6ffadcc96ad1daff (patch)
treeb7b4022f45fd01233bf76138d5222b81f16e8ad4 /test/web
parent5cb37412a21420509f61027fe486ae66242f800a (diff)
parentd9aacbec4d8e787ff9f62427a120d28366463a7f (diff)
downloadpleroma-1.0.2.tar.gz
Merge branch 'release/1.0.2' into 'master'v1.0.2
1.0.2 release See merge request pleroma/pleroma!1499
Diffstat (limited to 'test/web')
-rw-r--r--test/web/common_api/common_api_test.exs5
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs2
-rw-r--r--test/web/mastodon_api/status_view_test.exs2
3 files changed, 7 insertions, 2 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index e96106f11..6f57bbe1f 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -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)
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 03f57dbfa..152ba8137 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -3300,7 +3300,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
|> get("/api/v1/polls/#{object.id}")
response = json_response(conn, 200)
- id = object.id
+ id = to_string(object.id)
assert %{"id" => ^id, "expired" => false, "multiple" => false} = response
end
diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs
index ec75150ab..0d8eefeb8 100644
--- a/test/web/mastodon_api/status_view_test.exs
+++ b/test/web/mastodon_api/status_view_test.exs
@@ -361,7 +361,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
expected = %{
emojis: [],
expired: false,
- id: object.id,
+ id: to_string(object.id),
multiple: false,
options: [
%{title: "absolutely!", votes_count: 0},