'Setting toc_depth appropriately affects the Document\'s
show_toc property.'

@pytest.mark.toc
def test_show_toc(self):

    rev = revision(is_approved=True, save=True, content='Toggle    table    of    contents.')
    assert (rev.toc_depth != 0)
    assert rev.document.show_toc
    r = revision(document=rev.document, content=rev.content, toc_depth=0, is_approved=True)
    r.save()
    assert (not rev.document.show_toc)
    r = revision(document=rev.document, content=r.content, toc_depth=1, is_approved=True)
    r.save()
    assert rev.document.show_toc
