AdminApiControllerTest unused variables fix.

This commit is contained in:
Ivan Tashkinov 2019-04-08 12:32:55 +03:00
parent bffddf5e31
commit 44829d9181

View file

@ -80,14 +80,13 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
user = insert(:user) user = insert(:user)
follower = insert(:user) follower = insert(:user)
conn = build_conn()
build_conn() |> assign(:user, admin)
|> assign(:user, admin) |> put_req_header("accept", "application/json")
|> put_req_header("accept", "application/json") |> post("/api/pleroma/admin/user/follow", %{
|> post("/api/pleroma/admin/user/follow", %{ "follower" => follower.nickname,
"follower" => follower.nickname, "followed" => user.nickname
"followed" => user.nickname })
})
user = User.get_by_id(user.id) user = User.get_by_id(user.id)
follower = User.get_by_id(follower.id) follower = User.get_by_id(follower.id)
@ -104,14 +103,13 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
User.follow(follower, user) User.follow(follower, user)
conn = build_conn()
build_conn() |> assign(:user, admin)
|> assign(:user, admin) |> put_req_header("accept", "application/json")
|> put_req_header("accept", "application/json") |> post("/api/pleroma/admin/user/unfollow", %{
|> post("/api/pleroma/admin/user/unfollow", %{ "follower" => follower.nickname,
"follower" => follower.nickname, "followed" => user.nickname
"followed" => user.nickname })
})
user = User.get_by_id(user.id) user = User.get_by_id(user.id)
follower = User.get_by_id(follower.id) follower = User.get_by_id(follower.id)