fix bug sms
This commit is contained in:
1 parent
963fd839dc
commit
1d3cff0b63
3 files changed
+9
-5
No files matched your search
@@ -41,7 +41,7 @@ def create_ticket(*,customer,category,subject,selected_expert=None,body="",files
|
||||
enqueue(NotificationJob.Channel.SMS,"CUSTOMER_TICKET_CREATED",ticket,f"ticket:{ticket.pk}:customer-created",customer=customer)
|
||||
if owning_unit and owning_unit.bale_chat_id:
|
||||
enqueue(NotificationJob.Channel.BALE,"NEW_CUSTOMER_TICKET",ticket,f"ticket:{ticket.pk}:bale-group",payload={"ticket_number":ticket.ticket_number})
|
||||
enqueue_unit_supervisor_ticket_sms(ticket)
|
||||
enqueue_unit_supervisor_ticket_sms(ticket)
|
||||
return ticket
|
||||
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ def test_global_supervisor_sms_template_is_seeded_and_editable():
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_staff_created_ticket_also_notifies_owning_unit_supervisors(category, customer):
|
||||
def test_staff_created_ticket_notifies_customer_but_not_unit_supervisors(category, customer):
|
||||
category.unit.supervisor_mobile_1 = "09124445566"
|
||||
category.unit.save()
|
||||
staff = make_staff("a")
|
||||
@@ -289,8 +289,12 @@ def test_staff_created_ticket_also_notifies_owning_unit_supervisors(category, cu
|
||||
body="متن",
|
||||
)
|
||||
|
||||
job = NotificationJob.objects.get(ticket=ticket, event_type="UNIT_SUPERVISOR_NEW_TICKET")
|
||||
assert job.payload == {"recipient_mobile": "+989124445566"}
|
||||
assert NotificationJob.objects.filter(
|
||||
ticket=ticket,
|
||||
event_type="UNIT_SUPERVISOR_NEW_TICKET",
|
||||
).count() == 0
|
||||
customer_job = NotificationJob.objects.get(ticket=ticket, event_type="STAFF_TICKET_CREATED")
|
||||
assert customer_job.customer == customer
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_customer_bale_replies_are_debounced_by_database_policy(category,customer):
|
||||
|
||||
@@ -46,7 +46,7 @@ def test_dispatch_owner_can_resolve_all_open_group_tickets_from_report_or_ticket
|
||||
assert report.context["open_ticket_count"] == 1
|
||||
assert "حلشدن همه تیکتها (1)" in report_text
|
||||
ticket_page = client.get(reverse("staff_tickets:detail", args=[tickets[0].public_id]))
|
||||
assert "وابسته به ارسال گروهی" in ticket_page.content.decode()
|
||||
assert "ارسال گروهی" in ticket_page.content.decode()
|
||||
assert dispatch.subject in ticket_page.content.decode()
|
||||
assert "حلشدن تمامی تیکتهای گروه (1)" in ticket_page.content.decode()
|
||||
|
||||
|
||||
Reference in new issue
Block a user