diff options
Diffstat (limited to 'test/web/mastodon_api')
| -rw-r--r-- | test/web/mastodon_api/account_view_test.exs | 9 | ||||
| -rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 13 | 
2 files changed, 19 insertions, 3 deletions
| diff --git a/test/web/mastodon_api/account_view_test.exs b/test/web/mastodon_api/account_view_test.exs index 1611d937e..e2244dcb7 100644 --- a/test/web/mastodon_api/account_view_test.exs +++ b/test/web/mastodon_api/account_view_test.exs @@ -67,7 +67,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do          hide_favorites: true,          hide_followers: false,          hide_follows: false, -        relationship: %{} +        relationship: %{}, +        skip_thread_containment: false        }      } @@ -132,7 +133,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do          hide_favorites: true,          hide_followers: false,          hide_follows: false, -        relationship: %{} +        relationship: %{}, +        skip_thread_containment: false        }      } @@ -233,7 +235,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do            domain_blocking: false,            showing_reblogs: true,            endorsed: false -        } +        }, +        skip_thread_containment: false        }      } diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index b0cde649d..8679a083d 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -2539,6 +2539,19 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do        assert user["pleroma"]["hide_followers"] == true      end +    test "updates the user's skip_thread_containment option", %{conn: conn} do +      user = insert(:user) + +      response = +        conn +        |> assign(:user, user) +        |> patch("/api/v1/accounts/update_credentials", %{skip_thread_containment: "true"}) +        |> json_response(200) + +      assert response["pleroma"]["skip_thread_containment"] == true +      assert refresh_record(user).info.skip_thread_containment +    end +      test "updates the user's hide_follows status", %{conn: conn} do        user = insert(:user) | 
