pub fn register(client: &Client, first_name: &str, last_name: &str, email: &str, password: &str) {
    let response = client
        .post("/api/v1/users/register")
        .header(ContentType::JSON)
        .body(json_string!({"user": {"firstName": first_name, "lastName": last_name, "email": email, "password": password}}))
        .dispatch();

    match response.status() {
        Status::Ok | Status::Conflict => {} // ok,
        status => panic!("Registration failed: {}", status),
    }
}
/// Register user for use in other tests
Register user for use in other tests
Register user for use in other tests
pub fn register(client: &Client, first_name: &str, last_name: &str, email: &str, password: &str) {
    let response = client
        .post("/api/v1/users/register")
        .header(ContentType::JSON)
        .body(json_string!({"user": {"firstName": first_name, "lastName": last_name, "email": email, "password": password}}))
        .dispatch();
    match response.status() {
        Status::Ok | Status::Conflict => {} // ok,
        status => panic!("Registration failed: {}", status),
    }
}
pub fn register ( client : & Client , first_name : & str , last_name : & str , email : & str , password : & str ) { let response = client . post ( " " ) . header ( ContentType :: JSON ) . body ( json_string ! ( { " " { " " first_name " " last_name " " email " " password } } ) ) . dispatch ( ) ; match response . status ( ) { Status :: Ok | Status :: Conflict => { } // ok, status => panic ! ( " " status ) , } }
Register user for use in other tests
Register user for use in other tests
client
&Client
first_name
&str
last_name
&str
email
&str
password
&str
client
&Client
first_name
&str
last_name
&str
email
&str
password
&str