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

15 lines
336 B
Rust
Raw Normal View History

2022-03-04 10:11:12 +00:00
use flowy_grid_data_model::entities::*;
#[test]
fn grid_default_serde_test() {
let grid_id = "1".to_owned();
2022-03-10 04:01:31 +00:00
let grid = GridMeta {
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
}