Skip to main content

toasty_driver_integration_suite/scenarios/
user_unique_email_with_name.rs

1use crate::prelude::*;
2
3scenario! {
4    #[derive(Debug, toasty::Model)]
5    struct User {
6        #[key]
7        #[auto]
8        id: uuid::Uuid,
9
10        #[unique]
11        email: String,
12
13        name: String,
14    }
15
16    async fn setup(test: &mut Test) -> toasty::Db {
17        test.setup_db(models!(User)).await
18    }
19}