You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: delete_current.rs
    path of file: ./repos/crates.io/src/tests/routes/me/tokens
    
    the code of the file until where you have to start completion: use crate::util::{RequestHelper, TestApp};
use crates_io::models::ApiToken;
use crates_io::schema::api_tokens;
use diesel::prelude::*;
use http::StatusCode;

#[test]
fn revoke_current_token_success() {
    let (app, _, user, token) = TestApp::init().with_token();

    // Ensure that the token currently exists in the database
    app.db(|conn| {
        let tokens: Vec<ApiToken> = assert_ok!(ApiToken::belonging_to(user.as_model())
            .select(ApiToken::as_select())
            .filter(api_tokens::revoked.eq(false))
            .load(conn));
        assert_eq!(tokens.len(), 1);
        assert_eq!(tokens[0].name, token.as_model().name);
    });

    // Revoke the token
    let response = token.delete::<()>("/api/v1/tokens/current");
    assert_eq!(response.status(), StatusCode::NO_CONTENT);

    // Ensure that the token was removed from the database
 
    
fn revoke_current_token_with_cookie_user() {
    let (app, _, user, token) = TestApp::init().with_token();

    // Ensure that the token currently exists in the database
    app.db(|conn| {
        let tokens: Vec<ApiToken> = assert_ok!(ApiToken::belonging_to(user.as_model())
            .select(ApiToken::as_select())
            .filter(api_tokens::revoked.eq(false))
            .load(conn));
        assert_eq!(tokens.len(), 1);
        assert_eq!(tokens[0].name, token.as_model().name);
    });

    // Revoke the token
    let response = user.delete::<()>("/api/v1/tokens/current");
    assert_eq!(response.status(), StatusCode::BAD_REQUEST);
    assert_eq!(
        response.json(),
        json!({ "errors": [{ "detail": "token not provided" }] })
    );

    // Ensure that the token still exists in the database after the failed request
    app.db(|conn| {
        let tokens: Vec<ApiToken> = assert_ok!(ApiToken::belonging_to(user.as_model())
            .select(ApiToken::as_select())
            .filter(api_tokens::revoked.eq(false))
            .load(conn));
        assert_eq!(tokens.len(), 1);
    });
}