Added extra unit tests to User.

This commit is contained in:
Aaron Weiss 2014-11-28 17:12:02 -05:00
parent ca3d52201d
commit 7ee83a9b2d

View file

@ -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");