Add some State tests, and use genesis_hash, not label, where possible

This commit is contained in:
James Wilson
2021-06-28 11:20:48 +01:00
parent 8a0eb14aca
commit c5ca84ee9a
4 changed files with 188 additions and 70 deletions
+2 -1
View File
@@ -137,8 +137,9 @@ mod test {
#[test]
fn default_renames_instantly() {
let mut a: MostSeen<&str> = MostSeen::default();
a.insert(&"Hello");
let res = a.insert(&"Hello");
assert_eq!(*a.best(), "Hello");
assert!(res.has_changed());
}
#[test]