mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-27 19:09:12 +00:00
UserTest: Move insert_or_update test.
This commit is contained in:
parent
b331cb449a
commit
0aa56a853b
|
@ -374,4 +374,11 @@ defmodule Pleroma.UserTest do
|
|||
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("http://mastodon.example.org/users/admin")
|
||||
end
|
||||
|
||||
test "insert or update a user from given data" do
|
||||
user = insert(:user, %{nickname: "nick@name.de"})
|
||||
data = %{ ap_id: user.ap_id <> "xxx", name: user.name, nickname: user.nickname }
|
||||
|
||||
assert {:ok, %User{}} = User.insert_or_update_user(data)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue