Signed files keep their signature a string for every YAML parser (#4)
Co-authored-by: Danny Kim <temeddix@gmail.com> Co-committed-by: Danny Kim <temeddix@gmail.com>
This commit was merged in pull request #4.
This commit is contained in:
@@ -79,6 +79,8 @@ mod tests {
|
||||
.map_err(|_| ErrorCode::Internal)?;
|
||||
assert!(signed.starts_with("---\ntitle: Notes\n"));
|
||||
assert!(signed.ends_with("---\n# Notes\n\nHello\n"));
|
||||
// YAML reads a bare 0x... as an integer, so the signature stays a string.
|
||||
assert!(signed.contains("\nsignature: \"0x"));
|
||||
let fields = read_signature(&signed).ok_or(ErrorCode::Internal)?;
|
||||
assert_eq!(fields.signer, "laptop.alice.eth");
|
||||
let key = parse_key(KEY).ok_or(ErrorCode::Internal)?;
|
||||
|
||||
Reference in New Issue
Block a user