mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
add broadcast_message to database
new broadcast_message table. contains a whole bunch of timestamps, a couple of user ids for who created and who approved, some personalisation and a template id/version. areas is a jsonb field - it is expected that this will be an array, for example `["england", "wales"]` intended valid state transitions are as follows, from an initial status of draft * draft -> pending-approval, rejected * pending-approval -> broadcasting, rejected, (draft maybe) * broadcasting -> completed, cancelled rejected, completed, cancelled and technical-failure are terminating states. also copy across the enum switching code from migration 0060 (adding letter type).
This commit is contained in:
@@ -212,6 +212,7 @@ def test_should_raise_error_if_service_does_not_exist_on_create(client, sample_u
|
||||
|
||||
|
||||
@pytest.mark.parametrize('permissions, template_type, subject, expected_error', [
|
||||
([EMAIL_TYPE, SMS_TYPE, LETTER_TYPE], BROADCAST_TYPE, None, {'template_type': ['Creating broadcast message templates is not allowed']}), # noqa
|
||||
([EMAIL_TYPE], SMS_TYPE, None, {'template_type': ['Creating text message templates is not allowed']}),
|
||||
([SMS_TYPE], EMAIL_TYPE, 'subject', {'template_type': ['Creating email templates is not allowed']}),
|
||||
([SMS_TYPE], LETTER_TYPE, 'subject', {'template_type': ['Creating letter templates is not allowed']}),
|
||||
|
||||
Reference in New Issue
Block a user