mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Return notification postage in response for .post_precompiled_letter_notification
This commit is contained in:
@@ -94,7 +94,8 @@ def post_precompiled_letter_notification():
|
|||||||
|
|
||||||
resp = {
|
resp = {
|
||||||
'id': notification.id,
|
'id': notification.id,
|
||||||
'reference': notification.client_reference
|
'reference': notification.client_reference,
|
||||||
|
'postage': notification.postage
|
||||||
}
|
}
|
||||||
|
|
||||||
return jsonify(resp), 201
|
return jsonify(resp), 201
|
||||||
|
|||||||
@@ -510,7 +510,7 @@ def test_post_precompiled_letter_notification_returns_201(
|
|||||||
assert notification_history.postage == expected_postage
|
assert notification_history.postage == expected_postage
|
||||||
|
|
||||||
resp_json = json.loads(response.get_data(as_text=True))
|
resp_json = json.loads(response.get_data(as_text=True))
|
||||||
assert resp_json == {'id': str(notification.id), 'reference': 'letter-reference'}
|
assert resp_json == {'id': str(notification.id), 'reference': 'letter-reference', 'postage': expected_postage}
|
||||||
|
|
||||||
|
|
||||||
def test_post_letter_notification_throws_error_for_invalid_postage(client, notify_user, mocker):
|
def test_post_letter_notification_throws_error_for_invalid_postage(client, notify_user, mocker):
|
||||||
|
|||||||
Reference in New Issue
Block a user