projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'refactor/db-not-null-constraints-for-registrations' into 'develop'
[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 c7d1d05aaa1a2eafd134525cbfad7ea81c0b2267..e885e5a5abb87bde31302f93562e97e6555d4cb7 100644
(file)
--- a/
test/web/activity_pub/publisher_test.exs
+++ b/
test/web/activity_pub/publisher_test.exs
@@
-27,7
+27,7
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
test "it returns sharedInbox for messages involving as:Public in to" do
user =
insert(:user, %{
test "it returns sharedInbox for messages involving as:Public in to" do
user =
insert(:user, %{
-
info: %{source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"}
}}
+
source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"
}}
})
activity = %Activity{
})
activity = %Activity{
@@
-40,7
+40,7
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
test "it returns sharedInbox for messages involving as:Public in cc" do
user =
insert(:user, %{
test "it returns sharedInbox for messages involving as:Public in cc" do
user =
insert(:user, %{
-
info: %{source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"}
}}
+
source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"
}}
})
activity = %Activity{
})
activity = %Activity{
@@
-53,7
+53,7
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
test "it returns sharedInbox for messages involving multiple recipients in to" do
user =
insert(:user, %{
test "it returns sharedInbox for messages involving multiple recipients in to" do
user =
insert(:user, %{
-
info: %{source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"}
}}
+
source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"
}}
})
user_two = insert(:user)
})
user_two = insert(:user)
@@
-69,7
+69,7
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
test "it returns sharedInbox for messages involving multiple recipients in cc" do
user =
insert(:user, %{
test "it returns sharedInbox for messages involving multiple recipients in cc" do
user =
insert(:user, %{
-
info: %{source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"}
}}
+
source_data: %{"endpoints" => %{"sharedInbox" => "http://example.com/inbox"
}}
})
user_two = insert(:user)
})
user_two = insert(:user)
@@
-84,14
+84,12
@@
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, %{
- info: %{
- source_data: %{
- "inbox" => "http://example.com/personal-inbox",
- "endpoints" => %{"sharedInbox" => "http://example.com/inbox"}
- }
+ insert(:user,
+ source_data: %{
+ "inbox" => "http://example.com/personal-inbox",
+ "endpoints" => %{"sharedInbox" => "http://example.com/inbox"}
}
}
-
}
)
+ )
user_two = insert(:user)
user_two = insert(:user)
@@
-104,14
+102,12
@@
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, %{
- info: %{
- source_data: %{
- "inbox" => "http://example.com/personal-inbox",
- "endpoints" => %{"sharedInbox" => "http://example.com/inbox"}
- }
+ insert(:user,
+ source_data: %{
+ "inbox" => "http://example.com/personal-inbox",
+ "endpoints" => %{"sharedInbox" => "http://example.com/inbox"}
}
}
-
}
)
+ )
activity = %Activity{
data: %{"to" => [user.ap_id], "cc" => []}
activity = %Activity{
data: %{"to" => [user.ap_id], "cc" => []}
@@
-241,10
+237,8
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
follower =
insert(:user,
local: false,
follower =
insert(:user,
local: false,
- info: %{
- ap_enabled: true,
- source_data: %{"inbox" => "https://domain.com/users/nick1/inbox"}
- }
+ source_data: %{"inbox" => "https://domain.com/users/nick1/inbox"},
+ ap_enabled: true
)
actor = insert(:user, follower_address: follower.ap_id)
)
actor = insert(:user, follower_address: follower.ap_id)
@@
-278,19
+272,15
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
fetcher =
insert(:user,
local: false,
fetcher =
insert(:user,
local: false,
- info: %{
- ap_enabled: true,
- source_data: %{"inbox" => "https://domain.com/users/nick1/inbox"}
- }
+ source_data: %{"inbox" => "https://domain.com/users/nick1/inbox"},
+ ap_enabled: true
)
another_fetcher =
insert(:user,
local: false,
)
another_fetcher =
insert(:user,
local: false,
- info: %{
- ap_enabled: true,
- source_data: %{"inbox" => "https://domain2.com/users/nick1/inbox"}
- }
+ source_data: %{"inbox" => "https://domain2.com/users/nick1/inbox"},
+ ap_enabled: true
)
actor = insert(:user)
)
actor = insert(:user)
@@
-321,7
+311,7
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
assert called(
Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
inbox: "https://domain.com/users/nick1/inbox",
assert called(
Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
inbox: "https://domain.com/users/nick1/inbox",
- actor
: actor
,
+ actor
_id: actor.id
,
id: delete.data["id"]
})
)
id: delete.data["id"]
})
)
@@
-329,7
+319,7
@@
defmodule Pleroma.Web.ActivityPub.PublisherTest do
assert called(
Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
inbox: "https://domain2.com/users/nick1/inbox",
assert called(
Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
inbox: "https://domain2.com/users/nick1/inbox",
- actor
: actor
,
+ actor
_id: actor.id
,
id: delete.data["id"]
})
)
id: delete.data["id"]
})
)