Added extra unit tests to User.
This commit is contained in:
parent
ca3d52201d
commit
7ee83a9b2d
1 changed files with 12 additions and 0 deletions
|
@ -119,6 +119,18 @@ mod test {
|
|||
assert_eq!(user.access_level, exp.access_level);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_name() {
|
||||
let user = User::new("~owner");
|
||||
assert_eq!(user.get_name(), "owner");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn access_level() {
|
||||
let user = User::new("~owner");
|
||||
assert_eq!(user.access_level(), Owner);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn update_user_rank() {
|
||||
let mut user = User::new("user");
|
||||
|
|
Loading…
Reference in a new issue