projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[#534] Initial implementation of unreachable federation targets retirement.
[akkoma]
/
test
/
xml_builder_test.exs
diff --git
a/test/xml_builder_test.exs
b/test/xml_builder_test.exs
index f502a0f0ec3b2e1ca774e6648ef4ec20f24143a1..a7742f339f2d9a98fcea1ebd81d580dea2f8ef0b 100644
(file)
--- a/
test/xml_builder_test.exs
+++ b/
test/xml_builder_test.exs
@@
-1,9
+1,13
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.XmlBuilderTest do
use Pleroma.DataCase
alias Pleroma.XmlBuilder
test "Build a basic xml string from a tuple" do
defmodule Pleroma.XmlBuilderTest do
use Pleroma.DataCase
alias Pleroma.XmlBuilder
test "Build a basic xml string from a tuple" do
- data = {
:feed, %{ xmlns: "http://www.w3.org/2005/Atom"}, "Some content"
}
+ data = {
:feed, %{xmlns: "http://www.w3.org/2005/Atom"}, "Some content"
}
expected_xml = "<feed xmlns=\"http://www.w3.org/2005/Atom\">Some content</feed>"
expected_xml = "<feed xmlns=\"http://www.w3.org/2005/Atom\">Some content</feed>"
@@
-11,9
+15,10
@@
defmodule Pleroma.XmlBuilderTest do
end
test "returns a complete document" do
end
test "returns a complete document" do
- data = {
:feed, %{ xmlns: "http://www.w3.org/2005/Atom"}, "Some content"
}
+ data = {
:feed, %{xmlns: "http://www.w3.org/2005/Atom"}, "Some content"
}
- expected_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><feed xmlns=\"http://www.w3.org/2005/Atom\">Some content</feed>"
+ expected_xml =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><feed xmlns=\"http://www.w3.org/2005/Atom\">Some content</feed>"
assert XmlBuilder.to_doc(data) == expected_xml
end
assert XmlBuilder.to_doc(data) == expected_xml
end
@@
-34,11
+39,12
@@
defmodule Pleroma.XmlBuilderTest do
:feed,
[
{:guy, "brush"},
:feed,
[
{:guy, "brush"},
- {:lament, %{
configuration: "puzzle" }, "pinhead"
}
+ {:lament, %{
configuration: "puzzle"}, "pinhead"
}
]
}
]
}
- expected_xml = ~s[<feed><guy>brush</guy><lament configuration="puzzle">pinhead</lament></feed>]
+ expected_xml =
+ ~s[<feed><guy>brush</guy><lament configuration="puzzle">pinhead</lament></feed>]
assert XmlBuilder.to_xml(data) == expected_xml
end
assert XmlBuilder.to_xml(data) == expected_xml
end
@@
-50,7
+56,7
@@
defmodule Pleroma.XmlBuilderTest do
test "Uses self-closing tags when no content is giving" do
data = {
:link,
test "Uses self-closing tags when no content is giving" do
data = {
:link,
- %{
rel: "self"
}
+ %{
rel: "self"
}
}
expected_xml = ~s[<link rel="self" />]
}
expected_xml = ~s[<link rel="self" />]