additional (failing) sstore test
This commit is contained in:
parent
c9f5a9bc9a
commit
90e20cbcad
@ -381,6 +381,7 @@ mod tests {
|
|||||||
use super::*;
|
use super::*;
|
||||||
use devtools::*;
|
use devtools::*;
|
||||||
use common::*;
|
use common::*;
|
||||||
|
use crypto::KeyPair;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn can_insert() {
|
fn can_insert() {
|
||||||
@ -555,4 +556,15 @@ mod tests {
|
|||||||
let accounts = sstore.accounts().unwrap();
|
let accounts = sstore.accounts().unwrap();
|
||||||
assert_eq!(30, accounts.len());
|
assert_eq!(30, accounts.len());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn validate_generated_addresses() {
|
||||||
|
let temp = RandomTempPath::create_dir();
|
||||||
|
let mut sstore = SecretStore::new_test(&temp);
|
||||||
|
let addr = sstore.new_account("test").unwrap();
|
||||||
|
let _ok = sstore.unlock_account(&addr, "test").unwrap();
|
||||||
|
let secret = sstore.account_secret(&addr).unwrap();
|
||||||
|
let kp = KeyPair::from_secret(secret).unwrap();
|
||||||
|
assert_eq!(Address::from(kp.public().sha3()), addr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user