user = insert(:user)
follower = insert(:user)
- conn =
- build_conn()
- |> assign(:user, admin)
- |> put_req_header("accept", "application/json")
- |> post("/api/pleroma/admin/user/follow", %{
- "follower" => follower.nickname,
- "followed" => user.nickname
- })
+ build_conn()
+ |> assign(:user, admin)
+ |> put_req_header("accept", "application/json")
+ |> post("/api/pleroma/admin/user/follow", %{
+ "follower" => follower.nickname,
+ "followed" => user.nickname
+ })
user = User.get_by_id(user.id)
follower = User.get_by_id(follower.id)
User.follow(follower, user)
- conn =
- build_conn()
- |> assign(:user, admin)
- |> put_req_header("accept", "application/json")
- |> post("/api/pleroma/admin/user/unfollow", %{
- "follower" => follower.nickname,
- "followed" => user.nickname
- })
+ build_conn()
+ |> assign(:user, admin)
+ |> put_req_header("accept", "application/json")
+ |> post("/api/pleroma/admin/user/unfollow", %{
+ "follower" => follower.nickname,
+ "followed" => user.nickname
+ })
user = User.get_by_id(user.id)
follower = User.get_by_id(follower.id)