X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Flist_test.exs;h=ba79251da76070c990ccd2b2bbfef18cf8c9462a;hb=211008ae2f1ea97490a0ac70b8c801e58af6834c;hp=f39033d022d7c58f32ba379ddae54bbc52cdf859;hpb=03c4ea44add180454e071be935ed2150216cac88;p=akkoma
diff --git a/test/list_test.exs b/test/list_test.exs
index f39033d02..ba79251da 100644
--- a/test/list_test.exs
+++ b/test/list_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors
+# Copyright © 2017-2019 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.ListTest do
@@ -15,6 +15,13 @@ defmodule Pleroma.ListTest do
assert title == "title"
end
+ test "validates title" do
+ user = insert(:user)
+
+ assert {:error, changeset} = Pleroma.List.create("", user)
+ assert changeset.errors == [title: {"can't be blank", [validation: :required]}]
+ end
+
test "getting a list not belonging to the user" do
user = insert(:user)
other_user = insert(:user)