X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fostatus%2Fostatus_test.exs;h=70a0e44731e72534ec0bca0bcfc384360618f995;hb=90537f398160eddfb8033c1cdfe1acc21ee63c4a;hp=803a97695bf02d092a870f0320400db1d46e7d6c;hpb=267262491ecf7b413052708062abac69b1d8f643;p=akkoma
diff --git a/test/web/ostatus/ostatus_test.exs b/test/web/ostatus/ostatus_test.exs
index 803a97695..70a0e4473 100644
--- a/test/web/ostatus/ostatus_test.exs
+++ b/test/web/ostatus/ostatus_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors
+# Copyright © 2017-2019 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OStatusTest do
@@ -628,4 +628,18 @@ defmodule Pleroma.Web.OStatusTest do
refute OStatus.is_representable?(note_activity)
end
end
+
+ describe "make_user/2" do
+ test "creates new user" do
+ {:ok, user} = OStatus.make_user("https://social.heldscal.la/user/23211")
+
+ created_user =
+ User
+ |> Repo.get_by(ap_id: "https://social.heldscal.la/user/23211")
+ |> Map.put(:last_digest_emailed_at, nil)
+
+ assert user.info
+ assert user == created_user
+ end
+ end
end