AppFlowy/shared-lib/flowy-grid-data-model/tests/serde_test.rs

15 lines
340 B
Rust
Raw Normal View History

use flowy_grid_data_model::revision::*;
2022-03-04 10:11:12 +00:00
#[test]
fn grid_default_serde_test() {
let grid_id = "1".to_owned();
let grid = GridRevision {
2022-03-10 04:01:31 +00:00
grid_id,
fields: vec![],
blocks: vec![],
2022-03-04 10:11:12 +00:00
};
let json = serde_json::to_string(&grid).unwrap();
assert_eq!(json, r#"{"grid_id":"1","fields":[],"blocks":[]}"#)
2022-03-04 10:11:12 +00:00
}