Skip to content

Commit

Permalink
fix: updated failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ABeltramo committed Jan 7, 2025
1 parent 48671e6 commit 3c3e2e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/testWolfAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <state/config.hpp>

using Catch::Matchers::Equals;
using Catch::Matchers::ContainsSubstring;

using namespace wolf::api;
using curl_ptr = std::unique_ptr<CURL, decltype(&curl_easy_cleanup)>;
Expand Down Expand Up @@ -244,7 +245,7 @@ TEST_CASE("Sessions APIs", "[API]") {
.client_ip = "127.0.0.1"};
response = req(curl.get(), HTTPMethod::POST, "http://localhost/api/v1/sessions/add", rfl::json::write(session));
REQUIRE(response);
REQUIRE_THAT(response->second, Equals("{\"success\":true}"));
REQUIRE_THAT(response->second, Catch::Matchers::ContainsSubstring("{\"success\":true,\"session_id\":"));

// Test that the new session is in the list
response = req(curl.get(), HTTPMethod::GET, "http://localhost/api/v1/sessions");
Expand Down

0 comments on commit 3c3e2e2

Please sign in to comment.