Merge branch 'feature/change-password' into 'develop'

Feature/change password

See merge request pleroma/pleroma!166
This commit is contained in:
lambda 2018-05-24 17:16:37 +00:00
commit c41012053a
5 changed files with 106 additions and 6 deletions

View file

@ -21,13 +21,12 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
test "incorrect password given" do
{:ok, user} = UserBuilder.insert()
assert Utils.confirm_current_password(user, %{"password" => ""}) ==
{:error, "Invalid password."}
assert Utils.confirm_current_password(user, "") == {:error, "Invalid password."}
end
test "correct password given" do
{:ok, user} = UserBuilder.insert()
assert Utils.confirm_current_password(user, %{"password" => "test"}) == {:ok, user}
assert Utils.confirm_current_password(user, "test") == {:ok, user}
end
end
end