Skip to content

Commit

Permalink
ur: test not multipart error case
Browse files Browse the repository at this point in the history
  • Loading branch information
dspicher committed Feb 6, 2025
1 parent 474a167 commit 17d2b76
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ur.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,4 +491,16 @@ mod tests {
"can't decode single-part UR as multi-part"
);
}

#[test]
fn test_not_multipart() {
let mut decoder = Decoder::default();
assert_eq!(
decoder
.receive("ur:bytes/iehsjyhspmwfwfia")
.unwrap_err()
.to_string(),
"can't decode single-part UR as multi-part"
);
}
}

0 comments on commit 17d2b76

Please sign in to comment.