Add another JSON test for an empty JSON
This commit is contained in:
parent
de3b244a62
commit
e7e3a75924
1 changed files with 12 additions and 0 deletions
|
@ -153,6 +153,18 @@ mod test {
|
|||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_empty_json_to_fs() {
|
||||
let json = r#"{"version":"0.3.0","store":{}}"#;
|
||||
let mut json = Cursor::new(String::from(json).into_bytes());
|
||||
let mapper = JsonMapper::new();
|
||||
let mut hm = HashMap::new();
|
||||
|
||||
let io_res = mapper.read_to_fs(&mut json, &mut hm);
|
||||
assert!(io_res.is_ok());
|
||||
assert!(hm.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_json_to_fs() {
|
||||
let json = r#"
|
||||
|
|
Loading…
Reference in a new issue