Add header verification test
This commit is contained in:
parent
9884f78dae
commit
1187f7d9b3
1 changed files with 17 additions and 0 deletions
|
@ -224,5 +224,22 @@ mod test {
|
|||
assert!(!has_imag_version_in_main_section(&map));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_verification_good() {
|
||||
use super::verify_header_consistency;
|
||||
|
||||
let mut header = BTreeMap::new();
|
||||
let sub = {
|
||||
let mut sub = BTreeMap::new();
|
||||
sub.insert("version".into(), Value::String(String::from("0.0.0")));
|
||||
|
||||
Value::Table(sub)
|
||||
};
|
||||
|
||||
header.insert("imag".into(), sub);
|
||||
|
||||
assert!(verify_header_consistency(header).is_ok());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue