Add rich text formatting toolbar
This commit is contained in:
@@ -104,6 +104,19 @@ class MarkdownHeadingTests(TestCase):
|
||||
self.assertIn('# comment', rendered)
|
||||
self.assertNotIn('\\# comment', rendered)
|
||||
|
||||
def test_underline_is_allowed(self):
|
||||
self.assertIn('<u>underlined</u>', str(markdown('<u>underlined</u>')))
|
||||
|
||||
|
||||
class FormattingToolbarTests(TestCase):
|
||||
def test_toolbar_and_shortcuts_are_available(self):
|
||||
user = get_user_model().objects.create_user(username='formatting', password='secret')
|
||||
self.client.force_login(user)
|
||||
response = self.client.get(reverse('index'))
|
||||
self.assertContains(response, 'class="format-toolbar')
|
||||
self.assertContains(response, "formatSelection('bold')")
|
||||
self.assertContains(response, "u:'underline'")
|
||||
|
||||
|
||||
class CopyButtonTests(TestCase):
|
||||
def test_item_has_copy_button_with_original_text(self):
|
||||
|
||||
Reference in New Issue
Block a user