Merge branch 'develop' into refactor/following-relationships

This commit is contained in:
Egor Kislitsyn 2019-10-21 14:19:15 +07:00
commit 4ea1a61b00
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
219 changed files with 3097 additions and 4626 deletions

View file

@ -189,23 +189,6 @@ defmodule Pleroma.UserTest do
refute User.following?(follower, followed)
end
# This is a somewhat useless test.
# test "following a remote user will ensure a websub subscription is present" do
# user = insert(:user)
# {:ok, followed} = OStatus.make_user("shp@social.heldscal.la")
# assert followed.local == false
# {:ok, user} = User.follow(user, followed)
# assert User.ap_followers(followed) in User.following(user)
# query = from w in WebsubClientSubscription,
# where: w.topic == ^followed.info["topic"]
# websub = Repo.one(query)
# assert websub
# end
describe "unfollow/2" do
setup do
setting = Pleroma.Config.get([:instance, :external_user_synchronization])
@ -472,11 +455,6 @@ defmodule Pleroma.UserTest do
assert user == fetched_user
end
test "fetches an external user via ostatus if no user exists" do
{:ok, fetched_user} = User.get_or_fetch_by_nickname("shp@social.heldscal.la")
assert fetched_user.nickname == "shp@social.heldscal.la"
end
test "returns nil if no user could be fetched" do
{:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistant@social.heldscal.la")
assert fetched_user == "not found nonexistant@social.heldscal.la"