aboutsummaryrefslogtreecommitdiff
path: root/src/models/search.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/search.rs')
-rw-r--r--src/models/search.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/models/search.rs b/src/models/search.rs
index 7cd23dd..6bf8d8b 100644
--- a/src/models/search.rs
+++ b/src/models/search.rs
@@ -181,5 +181,19 @@ mod tests {
Ok(())
}
+
+ #[test]
+ fn text_property_is_not_empty() -> Result<(), Box<dyn std::error::Error>> {
+ let json = serde_json::to_string(&FilterCondition {
+ property: "Name".to_string(),
+ condition: Text(TextCondition::IsNotEmpty),
+ })?;
+ assert_eq!(
+ dbg!(json),
+ r#"{"property":"Name","text":{"is_not_empty":true}}"#
+ );
+
+ Ok(())
+ }
}
}