From 7ee83a9b2da4205a6924a2be4a130176a33bf0e1 Mon Sep 17 00:00:00 2001 From: Aaron Weiss Date: Fri, 28 Nov 2014 17:12:02 -0500 Subject: [PATCH] Added extra unit tests to User. --- src/data/user.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/data/user.rs b/src/data/user.rs index a6d773b..a40b928 100644 --- a/src/data/user.rs +++ b/src/data/user.rs @@ -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");