-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 63b3cdb.
- Loading branch information
Showing
4 changed files
with
1 addition
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,79 +103,6 @@ def test_delete(self, fake_uuid, mocker): | |
assert actual_data == {} | ||
|
||
|
||
class TestSendOtherCategoryInfo: | ||
def test_create_email_template_cat_other_to_freshdesk( | ||
self, | ||
client_request, | ||
mock_create_service_template, | ||
mock_get_template_folders, | ||
mock_get_service_template_when_no_template_exists, | ||
mock_get_template_categories, | ||
mock_send_other_category_to_freshdesk, | ||
active_user_with_permissions, | ||
fake_uuid, | ||
): | ||
client_request.post( | ||
".add_service_template", | ||
service_id=SERVICE_ONE_ID, | ||
template_type="email", | ||
_data={ | ||
"name": "new name", | ||
"subject": "Food incoming!", | ||
"template_content": "here's a burrito 🌯", | ||
"template_type": "email", | ||
"template_category_id": TESTING_TEMPLATE_CATEGORY, | ||
"service": SERVICE_ONE_ID, | ||
"process_type": DEFAULT_PROCESS_TYPE, | ||
"button_pressed": "save", | ||
"template_category_other": "hello", | ||
}, | ||
_follow_redirects=True, | ||
) | ||
assert mock_create_service_template.called is True | ||
assert mock_send_other_category_to_freshdesk.called is True | ||
mock_send_other_category_to_freshdesk.assert_called_once_with( | ||
active_user_with_permissions["id"], SERVICE_ONE_ID, "hello", None, fake_uuid | ||
) | ||
|
||
def test_edit_email_template_cat_other_to_freshdesk( | ||
self, | ||
client_request, | ||
mock_get_template_categories, | ||
mock_get_service_template, | ||
mock_update_service_template, | ||
mock_send_other_category_to_freshdesk, | ||
active_user_with_permissions, | ||
fake_uuid, | ||
): | ||
name = "new name" | ||
content = "template <em>content</em> with & entity" | ||
client_request.post( | ||
".edit_service_template", | ||
service_id=SERVICE_ONE_ID, | ||
template_id=fake_uuid, | ||
_data={ | ||
"id": fake_uuid, | ||
"name": name, | ||
"template_content": content, | ||
"template_type": "sms", | ||
"template_category_id": DEFAULT_TEMPLATE_CATEGORY_LOW, | ||
"service": SERVICE_ONE_ID, | ||
"template_category_other": "hello", | ||
"reply_to_text": "[email protected]", | ||
}, | ||
_follow_redirects=True, | ||
) | ||
|
||
mock_update_service_template.assert_called_with( | ||
fake_uuid, name, "sms", content, SERVICE_ONE_ID, None, DEFAULT_PROCESS_TYPE, DEFAULT_TEMPLATE_CATEGORY_LOW | ||
) | ||
assert mock_send_other_category_to_freshdesk.called is True | ||
mock_send_other_category_to_freshdesk.assert_called_once_with( | ||
active_user_with_permissions["id"], SERVICE_ONE_ID, "hello", None, fake_uuid | ||
) | ||
|
||
|
||
def test_should_show_empty_page_when_no_templates( | ||
client_request, | ||
service_one, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters