Add test for request parsing

This commit is contained in:
Greg Heartsfield 2021-11-24 13:48:40 -06:00
parent 5e9fca1aeb
commit c001726402

View File

@ -133,6 +133,8 @@ mod tests {
let s: Subscription = serde_json::from_str(raw_json)?;
assert_eq!(s.id, "some-id");
assert_eq!(s.filters.len(), 1);
let first_filter = s.filters.get(0).unwrap();
assert_eq!(first_filter.author, Some("test-author-id".to_owned()));
Ok(())
}
}