mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-05 14:11:41 -04:00
Allow free allowance to be set to 0
We want to be able to set the free allowance for a service to 0, but the form was not allowing this - it gave an error message of `Cannot be empty`. This can be fixed by changing the WTForms validator from `DataRequired` (which coerces 0 to falsey) to the `InputRequired` validator.
This commit is contained in:
@@ -3800,6 +3800,7 @@ def test_should_show_page_to_set_sms_allowance(
|
||||
|
||||
@freeze_time("2017-04-01 11:09:00.061258")
|
||||
@pytest.mark.parametrize('given_allowance, expected_api_argument', [
|
||||
('0', 0),
|
||||
('1', 1),
|
||||
('250000', 250000),
|
||||
pytest.param('foo', 'foo', marks=pytest.mark.xfail),
|
||||
|
||||
Reference in New Issue
Block a user