aboutsummaryrefslogtreecommitdiff
path: root/test/pleroma
diff options
context:
space:
mode:
Diffstat (limited to 'test/pleroma')
-rw-r--r--test/pleroma/web/activity_pub/transmogrifier/undo_handling_test.exs4
-rw-r--r--test/pleroma/web/common_api_test.exs17
2 files changed, 11 insertions, 10 deletions
diff --git a/test/pleroma/web/activity_pub/transmogrifier/undo_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/undo_handling_test.exs
index f6e40722c..29b1cc027 100644
--- a/test/pleroma/web/activity_pub/transmogrifier/undo_handling_test.exs
+++ b/test/pleroma/web/activity_pub/transmogrifier/undo_handling_test.exs
@@ -32,7 +32,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
assert activity.data["type"] == "Undo"
end
- test "it returns an error for incoming unlikes wihout a like activity" do
+ test "it returns an error for incoming unlikes without a like activity" do
user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{status: "leave a like pls"})
@@ -41,7 +41,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
|> Jason.decode!()
|> Map.put("object", activity.data["object"])
- assert Transmogrifier.handle_incoming(data) == :error
+ assert Transmogrifier.handle_incoming(data) == {:error, nil}
end
test "it works for incoming unlikes with an existing like activity" do
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
index a5dfd3934..9ec8677dc 100644
--- a/test/pleroma/web/common_api_test.exs
+++ b/test/pleroma/web/common_api_test.exs
@@ -15,6 +15,7 @@ defmodule Pleroma.Web.CommonAPITest do
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Transmogrifier
+ alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.ActivityPub.Visibility
alias Pleroma.Web.AdminAPI.AccountView
alias Pleroma.Web.CommonAPI
@@ -1213,15 +1214,15 @@ defmodule Pleroma.Web.CommonAPITest do
assert {:ok, follower} = CommonAPI.unfollow(follower, followed)
assert User.get_follow_state(follower, followed) == nil
- assert %{id: ^activity_id, data: %{"state" => "cancelled"}} =
- Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(follower, followed)
+ assert %{id: ^activity_id, data: %{"state" => "reject"}} =
+ Utils.fetch_latest_follow(follower, followed)
assert %{
data: %{
"type" => "Undo",
- "object" => %{"type" => "Follow", "state" => "cancelled"}
+ "object" => %{"type" => "Follow", "state" => "reject"}
}
- } = Pleroma.Web.ActivityPub.Utils.fetch_latest_undo(follower)
+ } = Utils.fetch_latest_undo(follower)
end
test "cancels a pending follow for a remote user" do
@@ -1235,15 +1236,15 @@ defmodule Pleroma.Web.CommonAPITest do
assert {:ok, follower} = CommonAPI.unfollow(follower, followed)
assert User.get_follow_state(follower, followed) == nil
- assert %{id: ^activity_id, data: %{"state" => "cancelled"}} =
- Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(follower, followed)
+ assert %{id: ^activity_id, data: %{"state" => "reject"}} =
+ Utils.fetch_latest_follow(follower, followed)
assert %{
data: %{
"type" => "Undo",
- "object" => %{"type" => "Follow", "state" => "cancelled"}
+ "object" => %{"type" => "Follow", "state" => "reject"}
}
- } = Pleroma.Web.ActivityPub.Utils.fetch_latest_undo(follower)
+ } = Utils.fetch_latest_undo(follower)
end
end