Give folders to new services by default

Step 1 of 2 of turning on folders for all services.

We think it’s a feature which will be useful for the majority of
services, and we think we’ve done enough research to know that it’s
mature enough to release to all services.
This commit is contained in:
Chris Hill-Scott
2019-01-08 13:09:04 +00:00
parent 208af8a508
commit 4b1336b405
3 changed files with 23 additions and 14 deletions

View File

@@ -25,7 +25,8 @@ from app.models import (
User,
DVLA_ORG_LAND_REGISTRY,
KEY_TYPE_NORMAL, KEY_TYPE_TEAM, KEY_TYPE_TEST,
EMAIL_TYPE, SMS_TYPE, LETTER_TYPE, INTERNATIONAL_SMS_TYPE, INBOUND_SMS_TYPE,
EMAIL_TYPE, SMS_TYPE, LETTER_TYPE,
EDIT_FOLDERS, INTERNATIONAL_SMS_TYPE, INBOUND_SMS_TYPE,
)
from tests import create_authorization_header
from tests.app.conftest import (
@@ -162,7 +163,7 @@ def test_get_service_list_has_default_permissions(admin_request, service_factory
set(
json['permissions']
) == set([
EMAIL_TYPE, SMS_TYPE, INTERNATIONAL_SMS_TYPE, LETTER_TYPE
EMAIL_TYPE, SMS_TYPE, INTERNATIONAL_SMS_TYPE, LETTER_TYPE, EDIT_FOLDERS,
])
for json in json_resp['data']
)
@@ -174,7 +175,7 @@ def test_get_service_by_id_has_default_service_permissions(admin_request, sample
assert set(
json_resp['data']['permissions']
) == set([
EMAIL_TYPE, SMS_TYPE, INTERNATIONAL_SMS_TYPE, LETTER_TYPE
EMAIL_TYPE, SMS_TYPE, INTERNATIONAL_SMS_TYPE, LETTER_TYPE, EDIT_FOLDERS,
])