def METHOD_NAME(
    mock_notify, staff_api_client, permission_group_manage_orders, order
):
    # given
    permission_group_manage_orders.user_set.add(staff_api_client.user)
    invoice = Invoice.objects.create(
        order=order, number=None, url=None, status=JobStatus.PENDING
    )
    variables = {"id": graphene.Node.to_global_id("Invoice", invoice.pk)}
    # when
    response = staff_api_client.post_graphql(INVOICE_SEND_EMAIL_MUTATION, variables)
    # then
    content = get_graphql_content(response)
    errors = content["data"]["invoiceSendNotification"]["errors"]
    assert errors == [
        {"field": "invoice", "code": "NOT_READY"},
        {"field": "url", "code": "URL_NOT_SET"},
        {"field": "number", "code": "NUMBER_NOT_SET"},
    ]
    mock_notify.assert_not_called()
    assert not order.events.filter(type=OrderEvents.INVOICE_SENT).exists()