110067722: Post add-service endpoint saves the service and maps it to the user.

This commit is contained in:
Rebecca Law
2015-12-15 09:28:15 +00:00
parent 350ccda208
commit 43f2605ac4
5 changed files with 16 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
from app.main.dao import verify_codes_dao
from app.main.dao import verify_codes_dao, services_dao
from tests.app.main import create_test_user
@@ -24,3 +24,5 @@ def test_should_add_service_and_redirect_to_next_page(notifications_admin, notif
response = client.post('/add-service', data={'service_name': 'testing the post'})
assert response.status_code == 302
assert response.location == 'http://localhost/dashboard'
saved_service = services_dao.find_service_by_service_name('testing the post')
assert saved_service is not None