mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: rust unit test
This commit is contained in:
parent
cad5e5d718
commit
481fd9df51
@ -219,6 +219,7 @@ class _GridCellContext<T, D> extends Equatable {
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
_cellListener.stop();
|
||||
_loadDataOperation?.cancel();
|
||||
_saveDataOperation?.cancel();
|
||||
|
||||
|
@ -358,7 +358,7 @@ impl std::convert::From<DateCellContentChangeset> for CellContentChangeset {
|
||||
mod tests {
|
||||
use crate::services::field::FieldBuilder;
|
||||
use crate::services::field::{DateCellContentChangeset, DateCellData, DateFormat, DateTypeOption, TimeFormat};
|
||||
use crate::services::row::{CellDataOperation, EncodedCellData};
|
||||
use crate::services::row::CellDataOperation;
|
||||
use flowy_grid_data_model::entities::{FieldMeta, FieldType, TypeOptionDataEntry};
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
|
@ -80,10 +80,10 @@ mod tests {
|
||||
// date
|
||||
let field_type = FieldType::DateTime;
|
||||
let date_time_field_meta = FieldBuilder::from_field_type(&field_type).build();
|
||||
let json = serde_json::to_string(&DateCellDataSerde::new(1647251762, None)).unwrap();
|
||||
|
||||
assert_eq!(
|
||||
type_option
|
||||
.decode_cell_data(json, &field_type, &date_time_field_meta)
|
||||
.decode_cell_data(1647251762.to_string(), &field_type, &date_time_field_meta)
|
||||
.unwrap()
|
||||
.parse::<DateCellData>()
|
||||
.unwrap()
|
||||
|
Loading…
Reference in New Issue
Block a user