Commit 0aa56a85 authored by lain's avatar lain
Browse files

UserTest: Move insert_or_update test.

parent b331cb44
......@@ -374,4 +374,11 @@ test ".delete deactivates a user, all follow relationships and all create activi
test "get_public_key_for_ap_id fetches a user that's not in the db" do
assert {:ok, _key} = User.get_public_key_for_ap_id("")
test "insert or update a user from given data" do
user = insert(:user, %{nickname: ""})
data = %{ ap_id: user.ap_id <> "xxx", name:, nickname: user.nickname }
assert {:ok, %User{}} = User.insert_or_update_user(data)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment