More tests

This commit is contained in:
arkpar
2016-02-16 21:25:01 +01:00
parent 4f73d63f90
commit fbe06d3f2f
2 changed files with 27 additions and 5 deletions

View File

@@ -987,3 +987,13 @@ fn load_key(path: &Path) -> Option<Secret> {
}
}
}
#[test]
fn key_save_load() {
use tests::helpers::RandomTempPath;
let temp_path = RandomTempPath::create_dir();
let key = H256::random();
save_key(temp_path.as_path(), &key);
let r = load_key(temp_path.as_path());
assert_eq!(key, r.unwrap());
}