Test to ensure incoming statuses have thread ids

This commit is contained in:
Mouse Reeve 2021-10-01 14:56:38 -07:00
parent ca4b262e72
commit f901806574

View file

@ -72,6 +72,7 @@ class InboxCreate(TestCase):
self.assertEqual(status.quote, "quote body") self.assertEqual(status.quote, "quote body")
self.assertEqual(status.content, "commentary") self.assertEqual(status.content, "commentary")
self.assertEqual(status.user, self.local_user) self.assertEqual(status.user, self.local_user)
self.assertEqual(status.thread_id, status.id)
# while we're here, lets ensure we avoid dupes # while we're here, lets ensure we avoid dupes
views.inbox.activity_task(activity) views.inbox.activity_task(activity)
@ -144,6 +145,7 @@ class InboxCreate(TestCase):
status = models.Status.objects.last() status = models.Status.objects.last()
self.assertEqual(status.content, "test content in note") self.assertEqual(status.content, "test content in note")
self.assertEqual(status.reply_parent, parent_status) self.assertEqual(status.reply_parent, parent_status)
self.assertEqual(status.thread_id, parent_status.id)
self.assertTrue(models.Notification.objects.filter(user=self.local_user)) self.assertTrue(models.Notification.objects.filter(user=self.local_user))
self.assertEqual(models.Notification.objects.get().notification_type, "REPLY") self.assertEqual(models.Notification.objects.get().notification_type, "REPLY")