Stop posting file_id when sending a letter

The endpoint works fine with it in the URL now instead, so we need stop
posting it. We can’t stop expecting it yet, because some old instances
will still be posting to the endpoint without the ID in the url.
This commit is contained in:
Chris Hill-Scott
2020-05-19 17:47:18 +01:00
parent bead6a9ad6
commit 32f0c1127d
2 changed files with 2 additions and 2 deletions

View File

@@ -55,9 +55,9 @@
<form method="post" enctype="multipart/form-data" action="{{url_for(
'main.send_uploaded_letter',
service_id=current_service.id,
file_id=file_id,
)}}" class='page-footer'>
{{ radios(form.postage, hide_legend=true, inline=True) }}
{{ form.file_id(value=file_id) }}
{{ page_footer("Send 1 letter") }}
</form>
{% endif %}

View File

@@ -371,7 +371,7 @@ def test_post_upload_letter_redirects_for_valid_file(
assert page.find('h1').text == 'tests/test_pdf_files/one_page_pdf.pdf'
assert not page.find(id='validation-error-message')
assert page.find('input', {'type': 'hidden', 'name': 'file_id', 'value': fake_uuid})
assert not page.find('input', {'name': 'file_id'})
assert normalize_spaces(page.select('main button[type=submit]')[0].text) == 'Send 1 letter'