Fix password reset flow (#1) #27

Merged
westfarn merged 4 commits from feature/password-reset-1 into master 2026-07-27 05:07:42 -07:00
Showing only changes of commit c3e29d3e72 - Show all commits
@@ -375,17 +375,21 @@ class FeedbackViewTestCase(APITestCase):
self.url = reverse("feedbacks")
def test_post_creates_feedback_and_notifies(self):
response = self.client.post(
self.url,
{"title": "Broken button", "text": "It does nothing"},
format="json",
)
with self.captureOnCommitCallbacks(execute=True):
response = self.client.post(
self.url,
{"title": "Broken button", "text": "It does nothing"},
format="json",
)
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
feedback = Feedback.objects.get()
self.assertEqual(feedback.user, self.user)
self.assertEqual(len(mail.outbox), 1)
self.assertIn("Broken button", mail.outbox[0].body)
outbound = OutboundEmail.objects.get(user=self.user)
self.assertEqual(outbound.kind, OutboundEmail.Kind.FEEDBACK)
self.assertEqual(outbound.status, OutboundEmail.Status.SENT)
def test_post_without_text_is_rejected(self):
response = self.client.post(self.url, {"title": "no body"}, format="json")