use Pleroma.DataCase
alias Pleroma.Web.OStatus
alias Pleroma.Web.XML
- alias Pleroma.{Object, Repo}
+ alias Pleroma.{Object, Repo, User}
import Pleroma.Factory
test "don't insert create notes twice" do
assert activity.data["object"]["type"] == "Note"
assert activity.data["object"]["actor"] == "https://social.heldscal.la/user/23211"
assert activity.data["object"]["content"] == "Will it blend?"
+ user = User.get_cached_by_ap_id(activity.data["actor"])
+ assert User.ap_followers(user) in activity.data["to"]
end
test "handle incoming notes with attachments - GS, subscription" do
end
describe "new remote user creation" do
+ test "returns local users" do
+ local_user = insert(:user)
+ {:ok, user} = OStatus.find_or_make_user(local_user.ap_id)
+
+ assert user == local_user
+ end
+
test "tries to use the information in poco fields" do
- # TODO make test local
uri = "https://social.heldscal.la/user/23211"
{:ok, user} = OStatus.find_or_make_user(uri)
end
test "find_make_or_update_user takes an author element and returns an updated user" do
- # TODO make test local
uri = "https://social.heldscal.la/user/23211"
{:ok, user} = OStatus.find_or_make_user(uri)