Fix test.

This commit is contained in:
lain 2018-03-22 12:37:24 +01:00
parent ff7afc0465
commit f9ab38a443
1 changed files with 2 additions and 2 deletions

View File

@ -40,8 +40,8 @@ def use_token(%Authorization{used: false, valid_until: valid_until} = auth) do
if NaiveDateTime.diff(NaiveDateTime.utc_now, valid_until) < 0 do
Repo.update(use_changeset(auth, %{used: true}))
else
{:error, "Token expired"}
{:error, "token expired"}
end
end
def use_token(%Authorization{used: true}), do: {:error, "Already used"}
def use_token(%Authorization{used: true}), do: {:error, "already used"}
end