Use router helper to generate reset password link

This commit is contained in:
Maxim Filippov 2019-09-22 16:36:59 +03:00
commit 72a01f1350
2 changed files with 6 additions and 4 deletions

View file

@ -596,7 +596,9 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|> put_req_header("accept", "application/json")
|> get("/api/pleroma/admin/users/#{user.nickname}/password_reset")
assert conn.status == 200
resp = json_response(conn, 200)
assert Regex.match?(~r/(http:\/\/|https:\/\/)/, resp["link"])
end
describe "GET /api/pleroma/admin/users" do