Merge branch 'fix/bookmark-depend-on-embeded-object' into 'develop'
[akkoma] / test / web / mastodon_api / mastodon_api_controller_test.exs
index 0c52dd3e34841d31029536fe234baf23f96b692d..aea0afa259e4d6052588693b19f4144269ce6eaf 100644 (file)
@@ -1022,7 +1022,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
       user2 = insert(:user)
       user3 = insert(:user)
       CommonAPI.favorite(activity.id, user2)
-      {:ok, user2} = User.bookmark(user2, activity.data["object"]["id"])
+      {:ok, _bookmark} = Pleroma.Bookmark.create(user2.id, activity.id)
       {:ok, reblog_activity1, _object} = CommonAPI.repeat(activity.id, user1)
       {:ok, _, _object} = CommonAPI.repeat(activity.id, user2)
 
@@ -2259,7 +2259,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
         |> patch("/api/v1/accounts/update_credentials", %{show_role: "false"})
 
       assert user = json_response(conn, 200)
-      assert user["pleroma"]["show_role"] == false
+      assert user["source"]["pleroma"]["show_role"] == false
     end
 
     test "updates the user's no_rich_text status", %{conn: conn} do
@@ -2271,7 +2271,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
         |> patch("/api/v1/accounts/update_credentials", %{no_rich_text: "true"})
 
       assert user = json_response(conn, 200)
-      assert user["pleroma"]["show_role"] == true
+      assert user["source"]["pleroma"]["no_rich_text"] == true
     end
 
     test "updates the user's name", %{conn: conn} do