Fixes #708 SUMMARY_MAX_LENGTH=0 should return empty string

This commit is contained in:
Deniz Turgut 2013-04-26 19:37:31 -04:00
commit 9af62414db
2 changed files with 8 additions and 4 deletions

View file

@ -71,6 +71,9 @@ class TestPage(unittest.TestCase):
settings['SUMMARY_MAX_LENGTH'] = 10
page = Page(**page_kwargs)
self.assertEqual(page.summary, truncate_html_words(TEST_CONTENT, 10))
settings['SUMMARY_MAX_LENGTH'] = 0
page = Page(**page_kwargs)
self.assertEqual(page.summary, '')
def test_slug(self):
# If a title is given, it should be used to generate the slug.