From c001726402feadbb2843bb2718ecaea20679003d Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Wed, 24 Nov 2021 13:48:40 -0600 Subject: [PATCH] Add test for request parsing --- src/request.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/request.rs b/src/request.rs index aa99851..a52b803 100644 --- a/src/request.rs +++ b/src/request.rs @@ -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(()) } }