aboutsummaryrefslogtreecommitdiff
path: root/app/tests/test_tui.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/tests/test_tui.py')
-rw-r--r--app/tests/test_tui.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/tests/test_tui.py b/app/tests/test_tui.py
index 38f4fa9..e7fd976 100644
--- a/app/tests/test_tui.py
+++ b/app/tests/test_tui.py
@@ -751,6 +751,17 @@ class FlashTests(TuiTestCase):
tui.flash(screen, "a notice", kind="warn")
self.assertEqual(screen.keys, [])
+ def test_message_is_shown_without_a_notice_heading(self):
+ screen = FakeScreen(keys=[10])
+ tui.flash(screen, "No backend is installed", kind="warn")
+ texts = [text for _, _, text, _ in screen.strings]
+ self.assertNotIn("Notice", texts)
+ # The warning itself is the dialog's content, in its kind color.
+ attr = next(a for _, _, text, a in screen.strings
+ if text == "No backend is installed")
+ self.assertEqual(attr, tui._THEME["warn"])
+ self.assert_inside_border(screen)
+
if __name__ == "__main__":
unittest.main()