From 83f231478a799d302a02e9c185531ce3c78988c8 Mon Sep 17 00:00:00 2001 From: Jake Swenson Date: Sat, 15 May 2021 19:49:19 -0700 Subject: adding test for is_not_empty --- src/models/search.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') 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> { + 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(()) + } } } -- cgit v1.2.3