mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
Default new services to prefixing text messages
We want new services, when they do the tour, to see how the service name they just made shows up in the messages. This is how it (should) work at the moment (although got broken because of the multiple senders stuff). Need to do this before we do the migration now otherwise a new service could sneak in with this setting still set to `null`.
This commit is contained in:
@@ -1562,18 +1562,18 @@ def test_set_sms_sender_for_service_rejects_null(client, sample_service):
|
||||
assert result['message'] == {'sms_sender': ['Field may not be null.']}
|
||||
|
||||
|
||||
@pytest.mark.parametrize('default_sms_sender, should_prefix', [
|
||||
(None, True), # None means use default
|
||||
('Foo', False),
|
||||
@pytest.mark.parametrize('service_attribute, should_prefix', [
|
||||
(True, True),
|
||||
(False, False),
|
||||
])
|
||||
def test_prefixing_messages_based_on_sms_sender(
|
||||
client,
|
||||
notify_db_session,
|
||||
default_sms_sender,
|
||||
service_attribute,
|
||||
should_prefix,
|
||||
):
|
||||
service = create_service(
|
||||
sms_sender=default_sms_sender or current_app.config['FROM_NUMBER']
|
||||
prefix_sms=service_attribute
|
||||
)
|
||||
create_service_sms_sender(
|
||||
service=service,
|
||||
|
||||
Reference in New Issue
Block a user