def METHOD_NAME(
    admin_request,
    sample_organisation,
    sample_user,
    mocker,
    org_invite_email_template,
    extra_args,
    expected_start_of_invite_url,
):
    mocked = mocker.patch("app.celery.provider_tasks.deliver_email.apply_async")
    email_address = "invited_user@example.com"
    data = dict(
        organisation=str(sample_organisation.id), email_address=email_address, invited_by=str(sample_user.id), **extra_args
    )
    json_resp = admin_request.post(
        "organisation_invite.invite_user_to_org",
        organisation_id=sample_organisation.id,
        _data=data,
        _expected_status=201,
    )
    assert json_resp["data"]["organisation"] == str(sample_organisation.id)
    assert json_resp["data"]["email_address"] == email_address
    assert json_resp["data"]["invited_by"] == str(sample_user.id)
    assert json_resp["data"]["status"] == INVITE_PENDING
    assert json_resp["data"]["id"]
    notification = Notification.query.first()
    assert notification.reply_to_text == sample_user.email_address
    assert len(notification.personalisation.keys()) == 3
    assert notification.personalisation["organisation_name"] == "sample organisation"
    assert notification.personalisation["user_name"] == "Test User"
    assert notification.personalisation["url"].startswith(expected_start_of_invite_url)
    assert len(notification.personalisation["url"]) > len(expected_start_of_invite_url)
    mocked.assert_called_once_with([(str(notification.id))], queue="notify-internal-tasks")