diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-09-25 23:35:31 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-09-25 23:57:25 -0400 |
| commit | cce1ab45db0de5e912fa7eec8d8a2cfe9a314078 (patch) | |
| tree | a5515c8487481cb5bf7082f8bd1431d76594c13a /src/channel/routes | |
| parent | fa21a7a397ae1f829e6e9c8f4a4bd30acda4372a (diff) | |
Retire `fixtures::error::expected!`.
I had no idea `std` included a `matches!` macro, and I feel we're better off using it.
Diffstat (limited to 'src/channel/routes')
| -rw-r--r-- | src/channel/routes/test/on_create.rs | 7 | ||||
| -rw-r--r-- | src/channel/routes/test/on_send.rs | 7 |
2 files changed, 6 insertions, 8 deletions
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 + )); } |
