X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fdocs%2Fgenerator_test.exs;h=9c9f4357b2836a116d84c0d05d528e4aee2484ab;hb=7605fe5065b62dcb8aaf7db07e5d168138b80d3e;hp=0106809c2d9106c275401d35ce13bd4aba946288;hpb=cda2c1fc630e455b3d419f5c3b22c366dc883ce1;p=akkoma diff --git a/test/docs/generator_test.exs b/test/docs/generator_test.exs index 0106809c2..9c9f4357b 100644 --- a/test/docs/generator_test.exs +++ b/test/docs/generator_test.exs @@ -85,6 +85,12 @@ defmodule Pleroma.Docs.GeneratorTest do 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 +214,12 @@ defmodule Pleroma.Docs.GeneratorTest do 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)