Add tests recipe_view and user_edit
This commit is contained in:
parent
710a134966
commit
ee4c2038b8
3 changed files with 132 additions and 56 deletions
|
|
@ -13,13 +13,15 @@ use crate::{
|
|||
#[derive(Debug, Display)]
|
||||
pub enum SignUpResult {
|
||||
UserAlreadyExists,
|
||||
UserCreatedWaitingForValidation(String), // Validation token.
|
||||
/// Validation token.
|
||||
UserCreatedWaitingForValidation(String),
|
||||
}
|
||||
|
||||
#[derive(Debug, Display)]
|
||||
pub enum UpdateUserResult {
|
||||
EmailAlreadyTaken,
|
||||
UserUpdatedWaitingForRevalidation(String), // Validation token.
|
||||
/// Validation token.
|
||||
UserUpdatedWaitingForRevalidation(String),
|
||||
Ok,
|
||||
}
|
||||
|
||||
|
|
@ -27,7 +29,7 @@ pub enum UpdateUserResult {
|
|||
pub enum ValidationResult {
|
||||
UnknownUser,
|
||||
ValidationExpired,
|
||||
/// Returns token and user id.
|
||||
/// Returns login token and user id.
|
||||
Ok(String, i64),
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +38,7 @@ pub enum SignInResult {
|
|||
UserNotFound,
|
||||
WrongPassword,
|
||||
AccountNotValidated,
|
||||
/// Returns token and user id.
|
||||
/// Returns login token and user id.
|
||||
Ok(String, i64),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue