Skip to main content

toasty_driver_integration_suite/scenarios/
user_with_address.rs

1use crate::prelude::*;
2
3scenario! {
4    #[derive(Debug, toasty::Model)]
5    #[allow(dead_code)]
6    struct User {
7        #[key]
8        id: String,
9
10        address: Address,
11    }
12
13    #[derive(Debug, toasty::Embed)]
14    struct Address {
15        street: String,
16        city: String,
17    }
18
19    async fn setup(test: &mut Test) -> toasty::Db {
20        test.setup_db(models!(User)).await
21    }
22}