From cce1ab45db0de5e912fa7eec8d8a2cfe9a314078 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 25 Sep 2024 23:35:31 -0400 Subject: Retire `fixtures::error::expected!`. I had no idea `std` included a `matches!` macro, and I feel we're better off using it. --- src/channel/routes/test/on_create.rs | 7 +++---- src/channel/routes/test/on_send.rs | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src/channel/routes/test') diff --git a/src/channel/routes/test/on_create.rs b/src/channel/routes/test/on_create.rs index df23deb..23885c0 100644 --- a/src/channel/routes/test/on_create.rs +++ b/src/channel/routes/test/on_create.rs @@ -50,9 +50,8 @@ async fn duplicate_name() { // Verify the structure of the response - fixtures::error::expected!( + assert!(matches!( error, - app::CreateError::DuplicateName(name), - assert_eq!(request.name, name), - ); + app::CreateError::DuplicateName(name) if request.name == name + )); } diff --git a/src/channel/routes/test/on_send.rs b/src/channel/routes/test/on_send.rs index 6690374..93a5480 100644 --- a/src/channel/routes/test/on_send.rs +++ b/src/channel/routes/test/on_send.rs @@ -141,9 +141,8 @@ async fn nonexistent_channel() { // Verify the structure of the response - fixtures::error::expected!( + assert!(matches!( error, - app::EventsError::ChannelNotFound(error_channel), - assert_eq!(channel, error_channel) - ); + app::EventsError::ChannelNotFound(error_channel) if channel == error_channel + )); } -- cgit v1.2.3