add skeleton for signup tests
This commit is contained in:
parent
0f0d7f488f
commit
bad698cc19
1 changed files with 30 additions and 0 deletions
|
@ -228,3 +228,33 @@ pub(crate) async fn create_user(
|
|||
_ => Err(CreateUserErrorKind::UnknownDBError.into()),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::{
|
||||
db::get_pool,
|
||||
test_utils::{get_user, server_with_pool},
|
||||
};
|
||||
|
||||
const GOOD_FORM: &str = "username=test_user&displayname=Test+User&password=aaaa&pw_verify=aaaa";
|
||||
|
||||
// various ways to fuck up signup
|
||||
const MISMATCH_PW_FORM: &str =
|
||||
"username=test_user&displayname=Test+User&password=aaaa&pw_verify=bbbb";
|
||||
const SHORT_PW_FORM: &str = "username=test_user&displayname=Test+User&password=a&pw_verify=a";
|
||||
const LONG_USERNAME_FORM: &str = "username=test_user12345678901234567890&displayname=Test+User&
|
||||
password=aaaa&pw_verify=aaaa";
|
||||
|
||||
#[tokio::test]
|
||||
async fn post_create_user_success() {
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn get_create_user() {
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn handle_signup_success() {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue