diff --git a/isso/tests/test_comments.py b/isso/tests/test_comments.py index 70bd3a3..1e2bdf1 100644 --- a/isso/tests/test_comments.py +++ b/isso/tests/test_comments.py @@ -375,6 +375,14 @@ class TestComments(unittest.TestCase): # just for the record self.assertEqual(self.post('/id/1/dislike', content_type=js).status_code, 200) + def testPreview(self): + response = self.post('/preview', data=json.dumps({'text': 'This is **mark***down*'})) + self.assertEqual(response.status_code, 200) + + rv = loads(response.data) + self.assertEqual(rv["text"], '
This is markdown
') + + class TestModeratedComments(unittest.TestCase): diff --git a/isso/views/comments.py b/isso/views/comments.py index 0272fa3..c0b03c6 100644 --- a/isso/views/comments.py +++ b/isso/views/comments.py @@ -89,7 +89,8 @@ class API(object): ('moderate',('POST', '/id/