forked from AkkomaGang/akkoma
UserTest: Move insert_or_update test.
This commit is contained in:
parent
b331cb449a
commit
0aa56a853b
1 changed files with 7 additions and 0 deletions
|
@ -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
|
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")
|
assert {:ok, _key} = User.get_public_key_for_ap_id("http://mastodon.example.org/users/admin")
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Reference in a new issue