projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
admin_api fetch status by id
[akkoma]
/
test
/
web
/
federator_test.exs
diff --git
a/test/web/federator_test.exs
b/test/web/federator_test.exs
index 59e53bb039f576d626fca9970275a0f7680f4261..261518ef03fa58c92570ca05d86f3570d1b7f6f8 100644
(file)
--- a/
test/web/federator_test.exs
+++ b/
test/web/federator_test.exs
@@
-130,6
+130,9
@@
defmodule Pleroma.Web.FederatorTest do
assert {:ok, job} = Federator.incoming_ap_doc(params)
assert {:ok, _activity} = ObanHelpers.perform(job)
assert {:ok, job} = Federator.incoming_ap_doc(params)
assert {:ok, _activity} = ObanHelpers.perform(job)
+
+ assert {:ok, job} = Federator.incoming_ap_doc(params)
+ assert {:error, :already_present} = ObanHelpers.perform(job)
end
test "rejects incoming AP docs with incorrect origin" do
end
test "rejects incoming AP docs with incorrect origin" do
@@
-148,7
+151,7
@@
defmodule Pleroma.Web.FederatorTest do
}
assert {:ok, job} = Federator.incoming_ap_doc(params)
}
assert {:ok, job} = Federator.incoming_ap_doc(params)
- assert
:error
= ObanHelpers.perform(job)
+ assert
{:error, :origin_containment_failed}
= ObanHelpers.perform(job)
end
test "it does not crash if MRF rejects the post" do
end
test "it does not crash if MRF rejects the post" do
@@
-164,7
+167,7
@@
defmodule Pleroma.Web.FederatorTest do
|> Poison.decode!()
assert {:ok, job} = Federator.incoming_ap_doc(params)
|> Poison.decode!()
assert {:ok, job} = Federator.incoming_ap_doc(params)
- assert
:error
= ObanHelpers.perform(job)
+ assert
{:error, _}
= ObanHelpers.perform(job)
end
end
end
end
end
end