Skip to content

Commit

Permalink
✅ [#4005] Test submission reference in report title
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm committed Apr 4, 2024
1 parent 08b0a3e commit a4fe8d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/openforms/submissions/tests/test_tasks_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@
class SubmissionReportGenerationTests(TestCase):
def test_submission_report_metadata(self):
submission = SubmissionFactory.create(
completed=True, form__name="Test Form", form__slug="test-form"
completed=True,
form__name="Test Form",
form__slug="test-form",
public_registration_reference="OF-TRALALA",
)

generate_submission_report.request.id = "some-id"
generate_submission_report.run(submission.id)

report = SubmissionReport.objects.get()
self.assertEqual(
_("%(title)s: Submission report") % {"title": "Test Form"}, report.title
_("%(title)s: Submission report (%(reference)s)")
% {"title": "Test Form", "reference": "OF-TRALALA"},
report.title,
)
self.assertEqual(submission, report.submission)
self.assertTrue(report.content.name.endswith("test-form.pdf"))
Expand Down

0 comments on commit a4fe8d0

Please sign in to comment.