mirror of
https://github.com/zensical/zensical.git
synced 2026-09-26 08:15:34 +00:00
fix: relax validation of autorefs settings
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
This commit is contained in:
+14
@@ -265,6 +265,20 @@ def test_accepts_supported_shim_options(
|
||||
assert plugins[name]["config"] == config
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"option", ["resolve_closest", "link_titles", "strip_title_tags"]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
"value", [True, False, "auto", "external", 42, [], {}, None]
|
||||
)
|
||||
def test_silently_discards_unsupported_autorefs_options(
|
||||
option: str, value: Any, capsys: pytest.CaptureFixture[str]
|
||||
) -> None:
|
||||
plugins = _convert_plugins({"autorefs": {"enabled": True, option: value}})
|
||||
assert plugins["autorefs"]["config"] == {"enabled": True}
|
||||
assert capsys.readouterr().err == ""
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("name", "config", "message"),
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user