summaryrefslogtreecommitdiff
path: root/test/web/activity_pub
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2018-12-11 15:31:52 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2018-12-12 09:09:19 +0300
commit89b3729afa130a62a47ed6372350ebfc5acb4064 (patch)
tree89fba8fe2ed33bb25ef554f67e4659e255f81709 /test/web/activity_pub
parent2999a08e3590c43c623730b0cbf6b93045ac08c1 (diff)
downloadpleroma-89b3729afa130a62a47ed6372350ebfc5acb4064.tar.gz
pleroma-89b3729afa130a62a47ed6372350ebfc5acb4064.zip
fix warnings
Diffstat (limited to 'test/web/activity_pub')
-rw-r--r--test/web/activity_pub/activity_pub_controller_test.exs8
-rw-r--r--test/web/activity_pub/activity_pub_test.exs2
-rw-r--r--test/web/activity_pub/transmogrifier_test.exs13
3 files changed, 11 insertions, 12 deletions
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs
index b4af2df5a..faeace016 100644
--- a/test/web/activity_pub/activity_pub_controller_test.exs
+++ b/test/web/activity_pub/activity_pub_controller_test.exs
@@ -23,10 +23,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
test "with the relay disabled, it returns 404", %{conn: conn} do
Pleroma.Config.put([:instance, :allow_relay], false)
- res =
- conn
- |> get(activity_pub_path(conn, :relay))
- |> json_response(404)
+ conn
+ |> get(activity_pub_path(conn, :relay))
+ |> json_response(404)
+ |> assert
Pleroma.Config.put([:instance, :allow_relay], true)
end
diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs
index 90f11ecd4..470ed08b2 100644
--- a/test/web/activity_pub/activity_pub_test.exs
+++ b/test/web/activity_pub/activity_pub_test.exs
@@ -180,7 +180,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
test "doesn't retrieve unlisted activities" do
user = insert(:user)
- {:ok, unlisted_activity} =
+ {:ok, _unlisted_activity} =
CommonAPI.post(user, %{"status" => "yeah", "visibility" => "unlisted"})
{:ok, listed_activity} = CommonAPI.post(user, %{"status" => "yeah"})
diff --git a/test/web/activity_pub/transmogrifier_test.exs b/test/web/activity_pub/transmogrifier_test.exs
index fa526a222..0428e052d 100644
--- a/test/web/activity_pub/transmogrifier_test.exs
+++ b/test/web/activity_pub/transmogrifier_test.exs
@@ -982,13 +982,12 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
end
test "users cannot be collided through fake direction spoofing attempts" do
- user =
- insert(:user, %{
- nickname: "rye@niu.moe",
- local: false,
- ap_id: "https://niu.moe/users/rye",
- follower_address: User.ap_followers(%User{nickname: "rye@niu.moe"})
- })
+ insert(:user, %{
+ nickname: "rye@niu.moe",
+ local: false,
+ ap_id: "https://niu.moe/users/rye",
+ follower_address: User.ap_followers(%User{nickname: "rye@niu.moe"})
+ })
{:error, _} = User.get_or_fetch_by_ap_id("https://n1u.moe/users/rye")
end