mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
- Refactor version 1 of post notificaitons to use the common persist_notificaiton and send_notification_to_queue methods.
- It would be nice to refactor the send_sms and send_email tasks to use these common functions as well, that way I can get rid of the new Notifications.from_v2_api_request method. - Still not happy with the format of the errors. Would like to find a happy place, where the message is descript enough that we do not need external documentation to explain the error. Perhaps we still only need documentation to explain the trial mode concept.
This commit is contained in:
@@ -46,5 +46,4 @@ def test_post_sms_notification_returns_404_when_template_is_wrong_type(notify_ap
|
||||
assert resp_text['code'] == '10400'
|
||||
assert resp_text['message'] == '{0} template is not suitable for {1} notification'.format('email', 'sms')
|
||||
assert resp_text['link'] == 'link to documentation'
|
||||
field = "{0} template is not suitable for {1} notification".format("email", "sms")
|
||||
assert resp_text['fields'][0]['template'] == field
|
||||
assert resp_text.get('fields', None) is None
|
||||
|
||||
Reference in New Issue
Block a user