diff options
| author | Roman Chvanikov <chvanikoff@pm.me> | 2019-07-16 16:19:19 +0300 |
|---|---|---|
| committer | Roman Chvanikov <chvanikoff@pm.me> | 2019-07-16 16:19:19 +0300 |
| commit | 9bca70b10a4c1a7664616b90c50c10c2a8a1003e (patch) | |
| tree | d228fe80c6ed7869e4b24fd758b03d2ab489d7d6 /test/web/mastodon_api/status_view_test.exs | |
| parent | b052a9d4d0323eb64c0a741a499906659a674244 (diff) | |
| parent | d3b922276138cf7aaa896d52a8e35113a40e22dc (diff) | |
| download | pleroma-9bca70b10a4c1a7664616b90c50c10c2a8a1003e.tar.gz pleroma-9bca70b10a4c1a7664616b90c50c10c2a8a1003e.zip | |
Merge develop
Diffstat (limited to 'test/web/mastodon_api/status_view_test.exs')
| -rw-r--r-- | test/web/mastodon_api/status_view_test.exs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index ac42819d8..3447c5b1f 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -423,7 +423,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}, @@ -541,4 +541,17 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do assert result[:reblog][:account][:pleroma][:relationship] == AccountView.render("relationship.json", %{user: user, target: user}) end + + test "visibility/list" do + user = insert(:user) + + {:ok, list} = Pleroma.List.create("foo", user) + + {:ok, activity} = + CommonAPI.post(user, %{"status" => "foobar", "visibility" => "list:#{list.id}"}) + + status = StatusView.render("status.json", activity: activity) + + assert status.visibility == "list" + end end |
