adding language tag

This commit is contained in:
Alexander Strizhakov 2019-04-08 11:03:10 +00:00 committed by lambda
parent 23067908de
commit 36c0a10fdf
2 changed files with 16 additions and 1 deletions

View File

@ -99,7 +99,10 @@ def make_json_ld_header do
%{ %{
"@context" => [ "@context" => [
"https://www.w3.org/ns/activitystreams", "https://www.w3.org/ns/activitystreams",
"#{Web.base_url()}/schemas/litepub-0.1.jsonld" "#{Web.base_url()}/schemas/litepub-0.1.jsonld",
%{
"@language" => "und"
}
] ]
} }
end end

View File

@ -193,4 +193,16 @@ test "returns the what was collected if there are less pages than specified" do
assert Utils.fetch_ordered_collection("http://example.com/outbox", 5) == [0, 1] assert Utils.fetch_ordered_collection("http://example.com/outbox", 5) == [0, 1]
end end
end end
test "make_json_ld_header/0" do
assert Utils.make_json_ld_header() == %{
"@context" => [
"https://www.w3.org/ns/activitystreams",
"http://localhost:4001/schemas/litepub-0.1.jsonld",
%{
"@language" => "und"
}
]
}
end
end end