Add visibility to actors
Also use url helpers to generate urls properly Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -421,8 +421,8 @@ defmodule Mobilizon.ActorsTest do
|
||||
assert follower.approved == true
|
||||
assert follower.score == 42
|
||||
|
||||
assert [target_actor] = Actor.get_followings(actor)
|
||||
assert [actor] = Actor.get_followers(target_actor)
|
||||
assert %{total: 1, elements: [target_actor]} = Actor.get_followings(actor)
|
||||
assert %{total: 1, elements: [actor]} = Actor.get_followers(target_actor)
|
||||
end
|
||||
|
||||
test "create_follower/1 with valid data but same actors fails to create a follower", %{
|
||||
|
||||
@@ -3,6 +3,8 @@ defmodule Mobilizon.Service.ActivityPub.UtilsTest do
|
||||
import Mobilizon.Factory
|
||||
alias Mobilizon.Service.ActivityPub.Utils
|
||||
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney
|
||||
alias MobilizonWeb.Router.Helpers, as: Routes
|
||||
alias MobilizonWeb.Endpoint
|
||||
|
||||
setup_all do
|
||||
HTTPoison.start()
|
||||
@@ -19,7 +21,7 @@ defmodule Mobilizon.Service.ActivityPub.UtilsTest do
|
||||
"content" => reply.text,
|
||||
"actor" => reply.actor.url,
|
||||
"uuid" => reply.uuid,
|
||||
"id" => "#{MobilizonWeb.Endpoint.url()}/comments/#{reply.uuid}",
|
||||
"id" => Routes.page_url(Endpoint, :comment, reply.uuid),
|
||||
"inReplyTo" => comment.url,
|
||||
"attributedTo" => reply.actor.url
|
||||
} == Utils.make_comment_data(reply)
|
||||
|
||||
Reference in New Issue
Block a user