Add test for rendering integer 0 in form input

This commit is contained in:
Ben Thorner
2022-03-07 17:35:32 +00:00
parent e0b62bed70
commit 6ba84140e5

View 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