diff options
author | 2021-05-15 19:49:19 -0700 | |
---|---|---|
committer | 2021-05-15 19:49:19 -0700 | |
commit | 83f231478a799d302a02e9c185531ce3c78988c8 (patch) | |
tree | fdb60debf6b03218cdf6c9d6f25857965839eab6 /src/models | |
parent | c9de25aa4e16d8352329c3d05b557af9cb9ab651 (diff) | |
download | notion-83f231478a799d302a02e9c185531ce3c78988c8.tar.gz notion-83f231478a799d302a02e9c185531ce3c78988c8.tar.zst notion-83f231478a799d302a02e9c185531ce3c78988c8.zip |
adding test for is_not_empty
Diffstat (limited to 'src/models')
-rw-r--r-- | src/models/search.rs | 14 |
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(()) + } } } |