summaryrefslogtreecommitdiff
path: root/test/web
diff options
context:
space:
mode:
authorSergey Suprunenko <suprunenko.s@gmail.com>2019-07-24 19:28:21 +0000
committerkaniini <ariadne@dereferenced.org>2019-07-24 19:28:21 +0000
commitb20020da160404f6f668eec2a2a42aaa2b6a09b2 (patch)
tree453b14e77c37a00da1ed35eb6dd781cb46055d70 /test/web
parentacd20914ec5a2cedfcd6a7405a22b6453d951164 (diff)
downloadpleroma-b20020da160404f6f668eec2a2a42aaa2b6a09b2.tar.gz
pleroma-b20020da160404f6f668eec2a2a42aaa2b6a09b2.zip
Show the url advertised in the Activity in the Status JSON response
Diffstat (limited to 'test/web')
-rw-r--r--test/web/mastodon_api/status_view_test.exs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs
index 3447c5b1f..0b167f839 100644
--- a/test/web/mastodon_api/status_view_test.exs
+++ b/test/web/mastodon_api/status_view_test.exs
@@ -300,6 +300,16 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
assert %{id: "2"} = StatusView.render("attachment.json", %{attachment: object})
end
+ test "put the url advertised in the Activity in to the url attribute" do
+ id = "https://wedistribute.org/wp-json/pterotype/v1/object/85810"
+ [activity] = Activity.search(nil, id)
+
+ status = StatusView.render("status.json", %{activity: activity})
+
+ assert status.uri == id
+ assert status.url == "https://wedistribute.org/2019/07/mastodon-drops-ostatus/"
+ end
+
test "a reblog" do
user = insert(:user)
activity = insert(:note_activity)