make sure auth type is set when registering

This commit is contained in:
Leo Hemsted
2017-11-14 17:01:04 +00:00
parent 6df775fb11
commit 5353a26bbf
2 changed files with 3 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ Create an account
</div>
<input class="visually-hidden" aria-hidden="true" tabindex="-1" id="defeat-chrome-autocomplete">
{{ textbox(form.password, hint="At least 8 characters", width='3-4') }}
{{form.auth_type}}
{{ page_footer("Continue") }}
</form>
</div>

View File

@@ -16,6 +16,8 @@ def test_render_register_returns_template_with_form(client):
response = client.get('/register')
assert response.status_code == 200
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert page.find('input', attrs={'name': 'auth_type'}).attrs['value'] == 'sms_auth'
assert 'Create an account' in response.get_data(as_text=True)