mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
Updated from git comments. Return status code 400 for duplicate
email address.
This commit is contained in:
@@ -35,6 +35,7 @@ def register():
|
||||
return redirect(url_for('main.verify'))
|
||||
else:
|
||||
flash('There was an error registering your account')
|
||||
return render_template('views/register.html', form=form), 400
|
||||
|
||||
return render_template('views/register.html', form=form)
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ def test_register_with_existing_email_returns_error(app_,
|
||||
with app_.test_request_context():
|
||||
response = app_.test_client().post(url_for('main.register'),
|
||||
data=user_data)
|
||||
assert response.status_code == 200
|
||||
assert response.status_code == 400
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
element = page.find('h1')
|
||||
assert element.text == 'Create an account'
|
||||
|
||||
Reference in New Issue
Block a user