aboutsummaryrefslogtreecommitdiff
path: root/test/user_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/user_test.exs')
-rw-r--r--test/user_test.exs17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/user_test.exs b/test/user_test.exs
index 9baa5ef24..1e73770df 100644
--- a/test/user_test.exs
+++ b/test/user_test.exs
@@ -11,6 +11,23 @@ defmodule Pleroma.UserTest do
:ok
end
+ describe "when tags are nil" do
+ test "tagging a user" do
+ user = insert(:user, %{tags: nil})
+ user = User.tag(user, ["cool", "dude"])
+
+ assert "cool" in user.tags
+ assert "dude" in user.tags
+ end
+
+ test "untagging a user" do
+ user = insert(:user, %{tags: nil})
+ user = User.untag(user, ["cool", "dude"])
+
+ assert user.tags == []
+ end
+ end
+
test "ap_id returns the activity pub id for the user" do
user = UserBuilder.build()