projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ActivityPub: Remove `delete` function.
[akkoma]
/
test
/
web
/
activity_pub
/
publisher_test.exs
diff --git
a/test/web/activity_pub/publisher_test.exs
b/test/web/activity_pub/publisher_test.exs
index da26b13f7040b8f880e1296231970e4cc4986512..c2bc38d52508fdf896d2781484dfe742080d4919 100644
(file)
--- a/
test/web/activity_pub/publisher_test.exs
+++ b/
test/web/activity_pub/publisher_test.exs
@@
-23,9
+23,7
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
:ok
end
:ok
end
- clear_config_all([:instance, :federating]) do
- Pleroma.Config.put([:instance, :federating], true)
- end
+ setup_all do: clear_config([:instance, :federating], true)
describe "gather_webfinger_links/1" do
test "it returns links" do
describe "gather_webfinger_links/1" do
test "it returns links" do
@@
-50,10
+48,7
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
describe "determine_inbox/2" do
test "it returns sharedInbox for messages involving as:Public in to" do
describe "determine_inbox/2" do
test "it returns sharedInbox for messages involving as:Public in to" do
- user =
- insert(:user, %{
- source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"}}
- })
+ user = insert(:user, %{shared_inbox: "http://example.com/inbox"})
activity = %Activity{
data: %{"to" => [@as_public], "cc" => [user.follower_address]}
activity = %Activity{
data: %{"to" => [@as_public], "cc" => [user.follower_address]}
@@
-63,10
+58,7
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
end
test "it returns sharedInbox for messages involving as:Public in cc" do
end
test "it returns sharedInbox for messages involving as:Public in cc" do
- user =
- insert(:user, %{
- source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"}}
- })
+ user = insert(:user, %{shared_inbox: "http://example.com/inbox"})
activity = %Activity{
data: %{"cc" => [@as_public], "to" => [user.follower_address]}
activity = %Activity{
data: %{"cc" => [@as_public], "to" => [user.follower_address]}
@@
-76,11
+68,7
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
end
test "it returns sharedInbox for messages involving multiple recipients in to" do
end
test "it returns sharedInbox for messages involving multiple recipients in to" do
- user =
- insert(:user, %{
- source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"}}
- })
-
+ user = insert(:user, %{shared_inbox: "http://example.com/inbox"})
user_two = insert(:user)
user_three = insert(:user)
user_two = insert(:user)
user_three = insert(:user)
@@
-92,11
+80,7
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
end
test "it returns sharedInbox for messages involving multiple recipients in cc" do
end
test "it returns sharedInbox for messages involving multiple recipients in cc" do
- user =
- insert(:user, %{
- source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"}}
- })
-
+ user = insert(:user, %{shared_inbox: "http://example.com/inbox"})
user_two = insert(:user)
user_three = insert(:user)
user_two = insert(:user)
user_three = insert(:user)
@@
-109,12
+93,10
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
test "it returns sharedInbox for messages involving multiple recipients in total" do
user =
test "it returns sharedInbox for messages involving multiple recipients in total" do
user =
- insert(:user,
- source_data: %{
- "inbox" => "http://example.com/personal-inbox",
- "endpoints" => %{"sharedInbox" => "http://example.com/inbox"}
- }
- )
+ insert(:user, %{
+ shared_inbox: "http://example.com/inbox",
+ inbox: "http://example.com/personal-inbox"
+ })
user_two = insert(:user)
user_two = insert(:user)
@@
-127,12
+109,10
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
test "it returns inbox for messages involving single recipients in total" do
user =
test "it returns inbox for messages involving single recipients in total" do
user =
- insert(:user,
- source_data: %{
- "inbox" => "http://example.com/personal-inbox",
- "endpoints" => %{"sharedInbox" => "http://example.com/inbox"}
- }
- )
+ insert(:user, %{
+ shared_inbox: "http://example.com/inbox",
+ inbox: "http://example.com/personal-inbox"
+ })
activity = %Activity{
data: %{"to" => [user.ap_id], "cc" => []}
activity = %Activity{
data: %{"to" => [user.ap_id], "cc" => []}
@@
-260,11
+240,11
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
[:passthrough],
[] do
follower =
[:passthrough],
[] do
follower =
- insert(:user,
+ insert(:user,
%{
local: false,
local: false,
-
source_data: %{"inbox" => "https://domain.com/users/nick1/inbox"}
,
+
inbox: "https://domain.com/users/nick1/inbox"
,
ap_enabled: true
ap_enabled: true
- )
+
}
)
actor = insert(:user, follower_address: follower.ap_id)
user = insert(:user)
actor = insert(:user, follower_address: follower.ap_id)
user = insert(:user)
@@
-297,14
+277,14
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
fetcher =
insert(:user,
local: false,
fetcher =
insert(:user,
local: false,
-
source_data: %{"inbox" => "https://domain.com/users/nick1/inbox"}
,
+
inbox: "https://domain.com/users/nick1/inbox"
,
ap_enabled: true
)
another_fetcher =
insert(:user,
local: false,
ap_enabled: true
)
another_fetcher =
insert(:user,
local: false,
-
source_data: %{"inbox" => "https://domain2.com/users/nick1/inbox"}
,
+
inbox: "https://domain2.com/users/nick1/inbox"
,
ap_enabled: true
)
ap_enabled: true
)