def METHOD_NAME(
    staff_api_client, menu, permission_manage_menus
):
    # given
    existing_menu = Menu.objects.create(name="test-slug-menu", slug="test-slug-menu")
    variables = {
        "id": graphene.Node.to_global_id("Menu", menu.pk),
        "name": "Blue oyster menu",
        "slug": existing_menu.slug,
    }
    # when
    response = staff_api_client.post_graphql(
        UPDATE_MENU_WITH_SLUG_MUTATION, variables, permissions=[permission_manage_menus]
    )
    # then
    content = get_graphql_content(response)
    error = content["data"]["menuUpdate"]["errors"][0]
    assert error["field"] == "slug"
    assert error["code"] == MenuErrorCode.UNIQUE.name