Skip to content

Commit

Permalink
add a test case for deserializing null
Browse files Browse the repository at this point in the history
  • Loading branch information
shouya committed Sep 18, 2024
1 parent 8c50af1 commit c2357dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,13 @@ mod serialization {
mod tests {
use super::*;

#[test]
fn test_deserialize_null() {
let json = r#"null"#;
let config: SourceConfig = serde_json::from_str(json).unwrap();
assert_eq!(config, SourceConfig::Dynamic);
}

#[test]
fn test_deserialize_dynamic() {
let json = r#""dynamic""#;
Expand Down

0 comments on commit c2357dc

Please sign in to comment.