From 9e6c5abce72e03b373db9f56b8920375f519878e Mon Sep 17 00:00:00 2001 From: Tomasz Pietrek Date: Thu, 1 Feb 2024 18:06:42 +0100 Subject: [PATCH] Improve test assertions Signed-off-by: Tomasz Pietrek --- async-nats/tests/jetstream_tests.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/async-nats/tests/jetstream_tests.rs b/async-nats/tests/jetstream_tests.rs index 8597dfcb8..5e62df07b 100644 --- a/async-nats/tests/jetstream_tests.rs +++ b/async-nats/tests/jetstream_tests.rs @@ -1157,6 +1157,10 @@ mod jetstream { .delete_consumer_from_stream("pull", "stream") .await .unwrap(); + assert!(stream + .get_consumer::("pull") + .await + .is_err()); } #[tokio::test] @@ -1173,7 +1177,7 @@ mod jetstream { }) .await .unwrap(); - context + let consumer = context .create_consumer_on_stream( consumer::push::Config { durable_name: Some("push".into()), @@ -1184,6 +1188,7 @@ mod jetstream { ) .await .unwrap(); + assert_eq!(consumer.cached_info().name, "push"); } #[tokio::test]