Refactor tests for relay task and refresh cassetes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-04-12 12:01:09 +02:00
parent 5f291336fd
commit ed7b53357f
8 changed files with 187 additions and 273 deletions

View File

@@ -16,9 +16,10 @@ defmodule Mix.Tasks.Mobilizon.Relay.Follow do
{:ok, _activity, _follow} ->
# put this task to sleep to allow the genserver to push out the messages
:timer.sleep(500)
shell_info("Requested to follow #{target}")
{:error, e} ->
IO.puts(:stderr, "Error while following #{target}: #{inspect(e)}")
shell_error("Error while following #{target}: #{inspect(e)}")
end
end

View File

@@ -16,9 +16,10 @@ defmodule Mix.Tasks.Mobilizon.Relay.Unfollow do
{:ok, _activity, _follow} ->
# put this task to sleep to allow the genserver to push out the messages
:timer.sleep(500)
shell_info("Unfollowed #{target}")
{:error, e} ->
IO.puts(:stderr, "Error while unfollowing #{target}: #{inspect(e)}")
shell_error("Error while unfollowing #{target}: #{inspect(e)}")
end
end