summaryrefslogtreecommitdiffstats
path: root/tests/test_directives/test_directive_other.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_directives/test_directive_other.py')
-rw-r--r--tests/test_directives/test_directive_other.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_directives/test_directive_other.py b/tests/test_directives/test_directive_other.py
index 1feb251..e00e291 100644
--- a/tests/test_directives/test_directive_other.py
+++ b/tests/test_directives/test_directive_other.py
@@ -137,6 +137,18 @@ def test_reversed_toctree(app):
@pytest.mark.sphinx(testroot='toctree-glob')
+def test_toctree_class(app):
+ text = ('.. toctree::\n'
+ ' :class: custom-toc\n'
+ '\n'
+ ' foo\n')
+ app.env.find_files(app.config, app.builder)
+ doctree = restructuredtext.parse(app, text, 'index')
+ assert_node(doctree, [nodes.document, nodes.compound, addnodes.toctree])
+ assert doctree[0].attributes['classes'] == ['toctree-wrapper', 'custom-toc']
+
+
+@pytest.mark.sphinx(testroot='toctree-glob')
def test_toctree_twice(app):
text = (".. toctree::\n"
"\n"