Builder.note/1: return {:ok, map(), keyword()} like other Builder functions

This commit is contained in:
Alex Gleason 2021-08-14 11:24:55 -05:00
commit ba6049aa81
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 36 additions and 28 deletions

View file

@ -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