From fcf667f09cdc310c4f717f97ba6e256ff5cd6132 Mon Sep 17 00:00:00 2001 From: David McDonald Date: Wed, 3 Mar 2021 18:22:41 +0000 Subject: [PATCH] Add test coverage for setting service permission Spotted that we aren't testing all our permission types here so added this one in. It includes the TODO for allowing the API to give a service the broadcast permission. We don't want this to happen, we want them to use the `set_as_broadcast_service` route instead. We will probably get away with it for the moment for it would be tighter validation we should add to reduce the risk of letting a service get in a dodgy state. --- tests/app/service/test_rest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/app/service/test_rest.py b/tests/app/service/test_rest.py index 0622dca67..d3db9083b 100644 --- a/tests/app/service/test_rest.py +++ b/tests/app/service/test_rest.py @@ -973,6 +973,8 @@ def test_update_service_permissions_will_add_service_permissions(client, sample_ (INTERNATIONAL_SMS_TYPE), (LETTER_TYPE), (INBOUND_SMS_TYPE), + (EMAIL_AUTH_TYPE), + (BROADCAST_TYPE), # TODO: remove this ability to set broadcast permission this way ] ) def test_add_service_permission_will_add_permission(client, service_with_no_permissions, permission_to_add):