diff options
author | lain <lain@soykaf.club> | 2018-12-17 20:12:01 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2018-12-17 20:12:01 +0100 |
commit | e4763cd459d36b2fcd22e2e4abd3a2a326a21f5f (patch) | |
tree | 2ba0c7169c25f33470992db0c473ec9688bcb28b /test | |
parent | 567359790ea623949585629c41580961c59a01ff (diff) | |
download | pleroma-e4763cd459d36b2fcd22e2e4abd3a2a326a21f5f.tar.gz |
Fix tagging problems for existing instances.
Diffstat (limited to 'test')
-rw-r--r-- | test/user_test.exs | 17 |
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() |