forked from AkkomaGang/akkoma
fix tests
This commit is contained in:
parent
6f05f448f8
commit
5b1d7c3c56
1 changed files with 6 additions and 8 deletions
|
@ -87,11 +87,9 @@ test "with relays deactivated, it does not publish to the relay", %{
|
||||||
{:ok, _activity} =
|
{:ok, _activity} =
|
||||||
CommonAPI.post(user, %{"status" => "HI @nick1@domain.com, @nick2@domain2.com!"})
|
CommonAPI.post(user, %{"status" => "HI @nick1@domain.com, @nick2@domain2.com!"})
|
||||||
|
|
||||||
assert called(
|
assert called(Federator.publish_single_ap(%{inbox: inbox1, unreachable_since: dt}))
|
||||||
Federator.enqueue(:publish_single_ap, %{inbox: inbox1, unreachable_since: dt})
|
|
||||||
)
|
|
||||||
|
|
||||||
refute called(Federator.enqueue(:publish_single_ap, %{inbox: inbox2}))
|
refute called(Federator.publish_single_ap(%{inbox: inbox2}))
|
||||||
end
|
end
|
||||||
|
|
||||||
test_with_mock "it federates only to reachable instances via Websub",
|
test_with_mock "it federates only to reachable instances via Websub",
|
||||||
|
@ -123,13 +121,13 @@ test "with relays deactivated, it does not publish to the relay", %{
|
||||||
{:ok, _activity} = CommonAPI.post(user, %{"status" => "HI"})
|
{:ok, _activity} = CommonAPI.post(user, %{"status" => "HI"})
|
||||||
|
|
||||||
assert called(
|
assert called(
|
||||||
Federator.enqueue(:publish_single_websub, %{
|
Federator.publish_single_websub(%{
|
||||||
callback: sub2.callback,
|
callback: sub2.callback,
|
||||||
unreachable_since: dt
|
unreachable_since: dt
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
refute called(Federator.enqueue(:publish_single_websub, %{callback: sub1.callback}))
|
refute called(Federator.publish_single_websub(%{callback: sub1.callback}))
|
||||||
end
|
end
|
||||||
|
|
||||||
test_with_mock "it federates only to reachable instances via Salmon",
|
test_with_mock "it federates only to reachable instances via Salmon",
|
||||||
|
@ -163,13 +161,13 @@ test "with relays deactivated, it does not publish to the relay", %{
|
||||||
CommonAPI.post(user, %{"status" => "HI @nick1@domain.com, @nick2@domain2.com!"})
|
CommonAPI.post(user, %{"status" => "HI @nick1@domain.com, @nick2@domain2.com!"})
|
||||||
|
|
||||||
assert called(
|
assert called(
|
||||||
Federator.enqueue(:publish_single_salmon, %{
|
Federator.publish_single_salmon(%{
|
||||||
recipient: remote_user2,
|
recipient: remote_user2,
|
||||||
unreachable_since: dt
|
unreachable_since: dt
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
refute called(Federator.enqueue(:publish_single_websub, %{recipient: remote_user1}))
|
refute called(Federator.publish_single_websub(%{recipient: remote_user1}))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue