projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ActivityPub: Return Announces when filtering by `following`.
[akkoma]
/
test
/
docs
/
generator_test.exs
diff --git
a/test/docs/generator_test.exs
b/test/docs/generator_test.exs
index 0106809c2d9106c275401d35ce13bd4aba946288..b32918a69339dd166e3644f1bc11751c69256b90 100644
(file)
--- a/
test/docs/generator_test.exs
+++ b/
test/docs/generator_test.exs
@@
-13,21
+13,13
@@
defmodule Pleroma.Docs.GeneratorTest do
key: :uploader,
type: :module,
description: "",
key: :uploader,
type: :module,
description: "",
- suggestions:
- Generator.list_modules_in_dir(
- "lib/pleroma/upload/filter",
- "Elixir.Pleroma.Upload.Filter."
- )
+ suggestions: {:list_behaviour_implementations, Pleroma.Upload.Filter}
},
%{
key: :filters,
type: {:list, :module},
description: "",
},
%{
key: :filters,
type: {:list, :module},
description: "",
- suggestions:
- Generator.list_modules_in_dir(
- "lib/pleroma/web/activity_pub/mrf",
- "Elixir.Pleroma.Web.ActivityPub.MRF."
- )
+ suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF}
},
%{
key: Pleroma.Upload,
},
%{
key: Pleroma.Upload,
@@
-85,6
+77,12
@@
defmodule Pleroma.Docs.GeneratorTest do
key: "application/xml",
type: {:list, :string},
suggestions: ["xml"]
key: "application/xml",
type: {:list, :string},
suggestions: ["xml"]
+ },
+ %{
+ key: :versions,
+ type: {:list, :atom},
+ description: "List of TLS version to use",
+ suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
}
]
},
}
]
},
@@
-208,6
+206,12
@@
defmodule Pleroma.Docs.GeneratorTest do
assert child[:key] == "application/xml"
end
assert child[:key] == "application/xml"
end
+ test "suggestion for tls versions" do
+ [%{children: children} | _] = Generator.convert_to_strings(@descriptions)
+ child = Enum.at(children, 8)
+ assert child[:suggestions] == [":tlsv1", ":tlsv1.1", ":tlsv1.2"]
+ end
+
test "subgroup with module name" do
[%{children: children} | _] = Generator.convert_to_strings(@descriptions)
test "subgroup with module name" do
[%{children: children} | _] = Generator.convert_to_strings(@descriptions)