summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormarcin mikołajczak <git@mkljczk.pl>2021-12-06 21:23:34 +0100
committermarcin mikołajczak <git@mkljczk.pl>2021-12-06 21:24:12 +0100
commitc96e52b88c47371de1cc4ed70786baf20008a811 (patch)
tree6fdd4e4240f17c0a26f85673aba7558decc3bbe9 /test
parent3892bd353b68aff51fd596239de43fb320616eac (diff)
Add 'notifying' to relationship for compatibility with Mastodon
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/mastodon_api/controllers/account_controller_test.exs4
-rw-r--r--test/pleroma/web/mastodon_api/views/account_view_test.exs2
2 files changed, 4 insertions, 2 deletions
diff --git a/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
index 70c6b152e..581944b8a 100644
--- a/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
@@ -922,7 +922,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
|> json_response_and_validate_schema(200)
end
- test "following with subscription and unsubscribing when notify is nil" do
+ test "following with subscription and unsubscribing" do
%{conn: conn} = oauth_access(["follow"])
followed = insert(:user)
@@ -937,7 +937,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
ret_conn =
conn
|> put_req_header("content-type", "application/json")
- |> post("/api/v1/accounts/#{followed.id}/follow")
+ |> post("/api/v1/accounts/#{followed.id}/follow", %{notify: false})
assert %{"id" => _id, "subscribing" => false} =
json_response_and_validate_schema(ret_conn, 200)
diff --git a/test/pleroma/web/mastodon_api/views/account_view_test.exs b/test/pleroma/web/mastodon_api/views/account_view_test.exs
index 60881756d..aeddd6b4c 100644
--- a/test/pleroma/web/mastodon_api/views/account_view_test.exs
+++ b/test/pleroma/web/mastodon_api/views/account_view_test.exs
@@ -268,6 +268,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
muting: false,
muting_notifications: false,
subscribing: false,
+ notifying: false,
requested: false,
domain_blocking: false,
showing_reblogs: true,
@@ -293,6 +294,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
muting: true,
muting_notifications: true,
subscribing: true,
+ notifying: true,
showing_reblogs: false,
id: to_string(other_user.id)
}