mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 07:52:43 +00:00
test: fix ActivityPub headers test
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
8d11073965
commit
f24866012b
1 changed files with 11 additions and 1 deletions
|
@ -34,7 +34,17 @@ defmodule Mobilizon.Federation.ActivityPubTest do
|
|||
date: Signature.generate_date_header()
|
||||
})
|
||||
|
||||
assert signature =~ "headers=\"date host digest content-length (request-target)\""
|
||||
headers =
|
||||
signature
|
||||
|> String.split(",")
|
||||
|> Enum.find(&String.starts_with?(&1, "headers"))
|
||||
|> String.replace_prefix("headers=\"", "")
|
||||
|> String.replace_suffix("\"", "")
|
||||
|> String.split(" ")
|
||||
|> MapSet.new()
|
||||
|
||||
assert headers ==
|
||||
MapSet.new(["date", "host", "digest", "content-length", "(request-target)"])
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue