diff options
author | Ekaterina Vaartis <vaartis@cock.li> | 2018-02-21 23:31:57 +0300 |
---|---|---|
committer | Ekaterina Vaartis <vaartis@cock.li> | 2018-02-21 23:31:57 +0300 |
commit | ec07e087bcef49c9d2766df3c0ad9e6767720013 (patch) | |
tree | b4dd529616cbb80acaff9b9d9bf6949f3d31c9f6 /test | |
parent | eec6a87dbb1186349c766c88829ad121588bb43b (diff) | |
download | pleroma-ec07e087bcef49c9d2766df3c0ad9e6767720013.tar.gz |
Make user bio optional
Diffstat (limited to 'test')
-rw-r--r-- | test/user_test.exs | 5 |
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 |