aboutsummaryrefslogtreecommitdiff
path: root/test/user_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2018-03-05 09:27:08 +0100
committerlain <lain@soykaf.club>2018-03-05 09:27:08 +0100
commit0f2bf3eefb0adba13a3f3d37e8d8b1bd414a33e4 (patch)
treee69fe391032fc9d9564e16db612480e08ed538e3 /test/user_test.exs
parent0e20d5529a090f12636caccb41e5e040786eb0c6 (diff)
parent3ecdab0911e061ec569fcd616c756ece9782a71b (diff)
downloadpleroma-0f2bf3eefb0adba13a3f3d37e8d8b1bd414a33e4.tar.gz
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into develop
Diffstat (limited to 'test/user_test.exs')
-rw-r--r--test/user_test.exs5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/user_test.exs b/test/user_test.exs
index 0c87b778c..6bfdfe1bf 100644
--- a/test/user_test.exs
+++ b/test/user_test.exs
@@ -101,13 +101,14 @@ defmodule Pleroma.UserTest do
email: "email@example.com"
}
- test "it requires a bio, email, name, nickname and password" do
+ test "it requires an email, name, nickname and password, bio is optional" do
@full_user_data
|> Map.keys
|> Enum.each(fn (key) ->
params = Map.delete(@full_user_data, key)
changeset = User.register_changeset(%User{}, params)
- assert changeset.valid? == false
+
+ assert (if key == :bio, do: changeset.valid?, else: not changeset.valid?)
end)
end