diff options
author | Syldexia <syldexia@ofthewi.red> | 2018-05-13 14:56:59 +0100 |
---|---|---|
committer | Syldexia <syldexia@ofthewi.red> | 2018-05-13 15:43:42 +0100 |
commit | 98b36d359a1a8c10ef9877902258d46b68331363 (patch) | |
tree | bd2709897c253faf6eeca6a5c7e755c2bb0c4283 /test/web/common_api/common_api_utils_test.exs | |
parent | 5bfb7b4ce6c23f84c27643e9871b78b867f86b7e (diff) | |
download | pleroma-98b36d359a1a8c10ef9877902258d46b68331363.tar.gz |
Fixed formatting and test
Diffstat (limited to 'test/web/common_api/common_api_utils_test.exs')
-rw-r--r-- | test/web/common_api/common_api_utils_test.exs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs index d59864c43..23cce471f 100644 --- a/test/web/common_api/common_api_utils_test.exs +++ b/test/web/common_api/common_api_utils_test.exs @@ -18,19 +18,14 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do end describe "it confirms the password given is the current users password" do - test "with no credentials" do - assert Utils.confirm_current_password(nil, %{"password" => "test"}) == - {:error, "Invalid credentials."} - end - - test "with incorrect password given" do + test "incorrect password given" do {:ok, user} = UserBuilder.insert() assert Utils.confirm_current_password(user, %{"password" => ""}) == {:error, "Invalid password."} end - test "with correct password given" do + test "correct password given" do {:ok, user} = UserBuilder.insert() assert Utils.confirm_current_password(user, %{"password" => "test"}) == {:ok, user} end |