mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Without the preview service name we probably have to go back to communicating a bit more on the add service page. This commit brings back the two bullet points about where the service name will appear, and tries to tie it into the nice words that Matt Sheret wrote for us.
13 lines
502 B
Python
13 lines
502 B
Python
from app.main.forms import AddServiceForm
|
|
from werkzeug.datastructures import MultiDict
|
|
|
|
|
|
def test_form_should_have_errors_when_duplicate_service_is_added(app_):
|
|
def _get_form_names():
|
|
return ['some service', 'more names']
|
|
with app_.test_request_context():
|
|
form = AddServiceForm(_get_form_names,
|
|
formdata=MultiDict([('name', 'some service')]))
|
|
form.validate()
|
|
assert {'name': ['This service name is already in use']} == form.errors
|