1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-23 00:14:48 +00:00
mobilizon/test/service/workers/refresh_instances_test.exs
Thomas Citharel da3b074619
fix(nodeinfo): make sure we only process JSON content
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2024-01-03 18:33:13 +01:00

27 lines
769 B
Elixir

defmodule Mobilizon.Service.Workers.RefreshInstancesTest do
@moduledoc """
Test the refresh instance module
"""
alias Mobilizon.Actors.Actor
alias Mobilizon.Federation.ActivityPub.Relay
alias Mobilizon.Service.Workers.RefreshInstances
use Mobilizon.DataCase
describe "Refresh instance actor" do
test "unless if local actor" do
# relay = Mobilizon.Web.Relay.get_actor()
assert {:error, :not_remote_instance} ==
RefreshInstances.refresh_instance_actor(nil)
end
test "unless if local relay actor" do
%Actor{url: url} = Relay.get_actor()
%URI{host: domain} = URI.new!(url)
assert {:error, :not_remote_instance} ==
RefreshInstances.refresh_instance_actor(domain)
end
end
end