diff options
| author | lain <lain@soykaf.club> | 2019-06-04 14:58:13 +0000 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2019-06-04 14:58:13 +0000 |
| commit | f178a6f3f0d152a5e75c82da08195ee2d7fd3612 (patch) | |
| tree | 3adf7ccf852cf4f4f12804a5f4427583905e17b7 /test/web/mastodon_api | |
| parent | 0eb7464c10df109e8aacf734bb092f69192ab5c2 (diff) | |
| parent | 1e7bb69a957c279eb75ed72cca779caa9d8f25ce (diff) | |
| download | pleroma-f178a6f3f0d152a5e75c82da08195ee2d7fd3612.tar.gz pleroma-f178a6f3f0d152a5e75c82da08195ee2d7fd3612.zip | |
Merge branch 'issue/941' into 'develop'
[#941] add option skip_thread_containment
See merge request pleroma/pleroma!1237
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) |
