mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Add test for rendering integer 0 in form input
This commit is contained in:
12
tests/app/main/forms/test_govuk_text_input_field.py
Normal file
12
tests/app/main/forms/test_govuk_text_input_field.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from flask_wtf import FlaskForm as Form
|
||||||
|
|
||||||
|
from app.main.forms import GovukTextInputField
|
||||||
|
|
||||||
|
|
||||||
|
def test_GovukTextInputField_renders_zero(client_request):
|
||||||
|
class FakeForm(Form):
|
||||||
|
field = GovukTextInputField()
|
||||||
|
|
||||||
|
form = FakeForm(field=0)
|
||||||
|
html = form.field()
|
||||||
|
assert 'value="0"' in html
|
||||||
Reference in New Issue
Block a user