From 5fda3d2c872b12a81ff710f2123be36a1787c9c7 Mon Sep 17 00:00:00 2001 From: Malte E <malte.e@mailbox.org> Date: Sat, 10 Dec 2022 09:51:26 +0800 Subject: [PATCH] remove struct from requests.hpp, make Test check for LE --- include/mtx/requests.hpp | 10 ---------- tests/client_api.cpp | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/mtx/requests.hpp b/include/mtx/requests.hpp index b1cefd8a3..cc19cd87f 100644 --- a/include/mtx/requests.hpp +++ b/include/mtx/requests.hpp @@ -439,15 +439,5 @@ struct SetPusher friend void to_json(nlohmann::json &obj, const SetPusher &req); }; - -struct userDirectorySearch -{ - //! The maximum number of results to return. Defaults to 10. - std::optional<int> limit; - //! Required: The term to search for - std::string search_term; - - friend void to_json(nlohmann::json &obj, const userDirectorySearch &data); -}; } // namespace requests } // namespace mtx diff --git a/tests/client_api.cpp b/tests/client_api.cpp index ee3cd5d6f..d62a27f58 100644 --- a/tests/client_api.cpp +++ b/tests/client_api.cpp @@ -1897,7 +1897,7 @@ TEST(ClientAPI, Users) "Bob", [alice](const mtx::responses::Users &users, RequestErr err) { check_error(err); - EXPECT_EQ(users.results.size(), 1); + EXPECT_LE(users.results.size(), 1); EXPECT_EQ(users.limited, true); }, 0); -- GitLab