Make compile with tests

This commit is contained in:
Gregor Reitzenstein 2020-10-28 23:25:59 +01:00
parent 2027d9696e
commit 4339537ec9
2 changed files with 5 additions and 4 deletions

View File

@ -357,6 +357,7 @@ mod tests {
#[test] #[test]
fn permission_ord_test() { fn permission_ord_test() {
assert!(PermissionBuf::from_string("bffh.perm") > PermissionBuf::from_string("bffh.perm.sub")); assert!(PermissionBuf::from_string("bffh.perm".to_string())
> PermissionBuf::from_string("bffh.perm.sub".to_string()));
} }
} }

View File

@ -68,11 +68,11 @@ mod tests {
let location = "testloc".to_string(); let location = "testloc".to_string();
assert_eq!("testuser", assert_eq!("testuser",
format!("{}", UserIdentifier::new(uid, None, None))); format!("{}", UserIdentifier::new(uid.clone(), None, None)));
assert_eq!("testuser+testsuid", assert_eq!("testuser+testsuid",
format!("{}", UserIdentifier::new(uid, Some(suid), None))); format!("{}", UserIdentifier::new(uid.clone(), Some(suid.clone()), None)));
assert_eq!("testuser+testsuid", assert_eq!("testuser+testsuid",
format!("{}", UserIdentifier::new(uid, Some(suid), None))); format!("{}", UserIdentifier::new(uid.clone(), Some(suid.clone()), None)));
assert_eq!("testuser+testsuid@testloc", assert_eq!("testuser+testsuid@testloc",
format!("{}", UserIdentifier::new(uid, Some(suid), Some(location)))); format!("{}", UserIdentifier::new(uid, Some(suid), Some(location))));
} }