Merge branch 'add-blocked-by-to-relationship' into 'develop'
[akkoma] / test / web / mastodon_api / status_view_test.exs
index ac42819d8e4a20ac278f8aff10d88b1f1b554885..3447c5b1f1309c11f745f7e4bb2f1ef79518d67b 100644 (file)
@@ -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