add a couple more tests for optional user
This commit is contained in:
parent
b59dfb5bf0
commit
0d03ce3d12
1 changed files with 18 additions and 0 deletions
|
@ -61,4 +61,22 @@ mod test {
|
||||||
fn signup_success_has_no_optional_user() {
|
fn signup_success_has_no_optional_user() {
|
||||||
assert!(!CreateUserSuccess::default().has_optional_user());
|
assert!(!CreateUserSuccess::default().has_optional_user());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn user_is_not_optional() {
|
||||||
|
#[derive(Default, OptionalOptionalUser)]
|
||||||
|
struct TestThing {
|
||||||
|
user: User,
|
||||||
|
}
|
||||||
|
assert!(!TestThing::default().has_optional_user());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn user_is_not_user() {
|
||||||
|
#[derive(Default, OptionalOptionalUser)]
|
||||||
|
struct TestThing {
|
||||||
|
user: Option<bool>,
|
||||||
|
}
|
||||||
|
assert!(!TestThing::default().has_optional_user());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue