From 5fe00c2d01ab420bde3d6cd24d2d0e9d95296132 Mon Sep 17 00:00:00 2001 From: beac0n Date: Mon, 12 Aug 2024 22:30:51 +0200 Subject: [PATCH] fix tests --- tests/commander_test.rs | 11 ++--------- tests/server_test.rs | 10 +--------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/tests/commander_test.rs b/tests/commander_test.rs index 50cf5d7..3eb227a 100644 --- a/tests/commander_test.rs +++ b/tests/commander_test.rs @@ -26,15 +26,8 @@ mod tests { let result = Commander::create_from_path(path); assert!(result.is_err()); - assert_eq!( - result.err().unwrap(), - r#"Could not create TOML from "/home/beac0n/dev/beac0n/ruroco/tests/config_invalid.toml": TOML parse error at line 1, column 1 - | -1 | foo = "bar" - | ^^^^^^^^^^^ -missing field `commands` -"# - ); + + assert!(result.err().unwrap().contains("TOML parse error at line 1, column 1")); } #[test] diff --git a/tests/server_test.rs b/tests/server_test.rs index 18dfb69..4cdd6dc 100644 --- a/tests/server_test.rs +++ b/tests/server_test.rs @@ -48,15 +48,7 @@ mod tests { let result = Server::create_from_path(path); assert!(result.is_err()); - assert_eq!( - result.err().unwrap(), - r#"Could not create TOML from "/home/beac0n/dev/beac0n/ruroco/tests/config_invalid.toml": TOML parse error at line 1, column 1 - | -1 | foo = "bar" - | ^^^^^^^^^^^ -missing field `commands` -"# - ); + assert!(result.err().unwrap().contains("TOML parse error at line 1, column 1")); } #[test]