mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Merge branch 'master' into forgot-password
This commit is contained in:
@@ -58,6 +58,18 @@ def test_user_has_permissions_multiple(app_,
|
||||
response = decorated_index()
|
||||
|
||||
|
||||
def test_exact_permissions(app_,
|
||||
api_user_active,
|
||||
mock_login,
|
||||
mock_get_user_with_permissions):
|
||||
with app_.test_request_context():
|
||||
with app_.test_client() as client:
|
||||
client.login(api_user_active)
|
||||
decorator = user_has_permissions('manage_users', 'manage_templates', 'manage_settings')
|
||||
decorated_index = decorator(index)
|
||||
response = decorated_index()
|
||||
|
||||
|
||||
def test_validate_header_row():
|
||||
row = {'bad': '+44 7700 900981'}
|
||||
try:
|
||||
|
||||
@@ -101,13 +101,13 @@ def test_new_user_accept_invite_calls_api_and_views_registration_page(app_,
|
||||
assert page.h1.string.strip() == 'Create an account'
|
||||
|
||||
form = page.find('form')
|
||||
email = form.find('input', id='email_address')
|
||||
name = form.find('input', id='name')
|
||||
password = form.find('input', id='password')
|
||||
service = form.find('input', type='hidden', id='service')
|
||||
email = form.find('input', type='hidden', id='email_address')
|
||||
|
||||
assert email
|
||||
assert email.attrs['disabled']
|
||||
assert email.attrs['value'] == 'invited_user@test.gov.uk'
|
||||
assert name
|
||||
assert password
|
||||
assert service
|
||||
|
||||
Reference in New Issue
Block a user