diff options
author | Teddy Wing | 2022-03-13 01:55:25 +0100 |
---|---|---|
committer | Teddy Wing | 2022-03-13 01:55:25 +0100 |
commit | de7c2af3414cf686165efd933b61da4e4527cf77 (patch) | |
tree | fd7d8b2b8d28e6691bd150606e0f550f6471a648 /src/lib.rs | |
parent | 306dec4c599736ecffef321fc419e3fa7bec77a3 (diff) | |
download | yaqlite-de7c2af3414cf686165efd933b61da4e4527cf77.tar.bz2 |
insert(): Add test for non-array YAML hash
Test that a plain YAML hash gets inserted even when not wrapped in an
array.
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -139,5 +139,23 @@ r#"- description: >- #[test] fn inserts_yaml_hash() { + let expected = TestRecord { + id: 1, + count: 255, + weight: 86.6, + description: "Some text content.".to_owned(), + }; + + let yaml_str = format!( +r#"description: {} +count: {} +weight: {} +"#, + expected.description, + expected.count, + expected.weight, + ); + + test_yaml_insert(&yaml_str, &vec![expected]); } } |