aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-08-14 11:24:55 -0500
committerAlex Gleason <alex@alexgleason.me>2021-08-14 11:24:55 -0500
commitba6049aa81778ac4cbac8554792e749caf9e7860 (patch)
treecb644ffc71a7e54aad65065dcec5c5697cd5d36a /test
parenta2eacfc525fe40ddea0345dd21fad157c38ebc0a (diff)
downloadpleroma-ba6049aa81778ac4cbac8554792e749caf9e7860.tar.gz
Builder.note/1: return {:ok, map(), keyword()} like other Builder functions
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/activity_pub/builder_test.exs28
1 files changed, 15 insertions, 13 deletions
diff --git a/test/pleroma/web/activity_pub/builder_test.exs b/test/pleroma/web/activity_pub/builder_test.exs
index 103521c96..3fe32bce5 100644
--- a/test/pleroma/web/activity_pub/builder_test.exs
+++ b/test/pleroma/web/activity_pub/builder_test.exs
@@ -28,19 +28,21 @@ defmodule Pleroma.Web.ActivityPub.BuilderTest do
extra: %{"custom_tag" => "test"}
}
- assert Builder.note(draft) == %{
- "actor" => user.ap_id,
- "attachment" => [],
- "cc" => [user3.ap_id],
- "content" => "<h1>This is :moominmamma: note</h1>",
- "context" => "2hu",
- "sensitive" => false,
- "summary" => "test summary",
- "tag" => ["jimm"],
- "to" => [user2.ap_id],
- "type" => "Note",
- "custom_tag" => "test"
- }
+ expected = %{
+ "actor" => user.ap_id,
+ "attachment" => [],
+ "cc" => [user3.ap_id],
+ "content" => "<h1>This is :moominmamma: note</h1>",
+ "context" => "2hu",
+ "sensitive" => false,
+ "summary" => "test summary",
+ "tag" => ["jimm"],
+ "to" => [user2.ap_id],
+ "type" => "Note",
+ "custom_tag" => "test"
+ }
+
+ assert {:ok, ^expected, []} = Builder.note(draft)
end
end
end