diff --git a/tests/functional/openlp_core_lib/test_htmlbuilder.py b/tests/functional/openlp_core_lib/test_htmlbuilder.py index 8ca98060d..b90531c8d 100644 --- a/tests/functional/openlp_core_lib/test_htmlbuilder.py +++ b/tests/functional/openlp_core_lib/test_htmlbuilder.py @@ -197,6 +197,7 @@ FOOTER_CSS_BASE = """ """ FOOTER_CSS = FOOTER_CSS_BASE % ('nowrap') FOOTER_CSS_WRAP = FOOTER_CSS_BASE % ('normal') +FOOTER_CSS_INVALID = '' class Htmbuilder(TestCase, TestMixin): @@ -359,6 +360,26 @@ class Htmbuilder(TestCase, TestMixin): # THEN: Footer should wrap self.assertEqual(FOOTER_CSS_WRAP, css, 'The footer strings should be equal.') + def build_footer_invalid_test(self): + """ + Test the build_footer_css() function + """ + # GIVEN: Create a theme. + css = [] + item = MagicMock() + item.theme_data = None + item.footer = 'FAIL' + + # WHEN: Settings say that footer should wrap + css.append(build_footer_css(item, height)) + item.theme_data = 'TEST' + item.footer = None + css.append(build_footer_css(item, height)) + + # THEN: Footer should wrap + self.assertEqual(FOOTER_CSS_INVALID, css[0], 'The footer strings should be blank.') + self.assertEqual(FOOTER_CSS_INVALID, css[1], 'The footer strings should be blank.') + def webkit_version_test(self): """ Test the webkit_version() function