summaryrefslogtreecommitdiff
path: root/tests/unit/plugins/relay/api
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-04-29 21:56:38 +0200
committerSébastien Helleu <flashcode@flashtux.org>2024-04-29 21:56:38 +0200
commit1d9cdba58e834ff82033c92bcc570a03bcc61084 (patch)
tree0c126712f0a88bda9a53eeaa371f22b2fe1a17ea /tests/unit/plugins/relay/api
parent9cd7fd38a91dc2980e82be49185c1eb20d70c0f9 (diff)
downloadweechat-1d9cdba58e834ff82033c92bcc570a03bcc61084.zip
relay/api: rename field "nicklist" to "nicklist_root" in GET /api/buffers
Diffstat (limited to 'tests/unit/plugins/relay/api')
-rw-r--r--tests/unit/plugins/relay/api/test-relay-api-msg.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/unit/plugins/relay/api/test-relay-api-msg.cpp b/tests/unit/plugins/relay/api/test-relay-api-msg.cpp
index c553539b1..bf2d81bb5 100644
--- a/tests/unit/plugins/relay/api/test-relay-api-msg.cpp
+++ b/tests/unit/plugins/relay/api/test-relay-api-msg.cpp
@@ -119,7 +119,7 @@ TEST(RelayApiMsg, SendEvent)
TEST(RelayApiMsg, BufferToJson)
{
cJSON *json, *json_obj, *json_local_vars, *json_lines;
- cJSON *json_nicklist, *json_nicks, *json_groups, *json_group;
+ cJSON *json_nicklist_root, *json_nicks, *json_groups, *json_group;
cJSON *json_group_nicks, *json_nick;
struct t_gui_buffer *buffer;
struct t_gui_nick_group *group;
@@ -179,13 +179,13 @@ TEST(RelayApiMsg, BufferToJson)
CHECK(json_lines);
CHECK(cJSON_IsArray (json_lines));
LONGS_EQUAL(0, cJSON_GetArraySize (json_lines));
- json_nicklist = cJSON_GetObjectItem (json, "nicklist");
- CHECK(json_nicklist);
- CHECK(cJSON_IsObject (json_nicklist));
- WEE_CHECK_OBJ_NUM(0, json_nicklist, "id");
- WEE_CHECK_OBJ_STR("root", json_nicklist, "name");
- WEE_CHECK_OBJ_STR("", json_nicklist, "color");
- json_groups = cJSON_GetObjectItem (json_nicklist, "groups");
+ json_nicklist_root = cJSON_GetObjectItem (json, "nicklist_root");
+ CHECK(json_nicklist_root);
+ CHECK(cJSON_IsObject (json_nicklist_root));
+ WEE_CHECK_OBJ_NUM(0, json_nicklist_root, "id");
+ WEE_CHECK_OBJ_STR("root", json_nicklist_root, "name");
+ WEE_CHECK_OBJ_STR("", json_nicklist_root, "color");
+ json_groups = cJSON_GetObjectItem (json_nicklist_root, "groups");
CHECK(json_groups);
CHECK(cJSON_IsArray (json_groups));
LONGS_EQUAL(1, cJSON_GetArraySize (json_groups));
@@ -256,7 +256,7 @@ TEST(RelayApiMsg, BufferToJson)
WEE_CHECK_OBJ_STR(color, json_nick, "color");
free (color);
WEE_CHECK_OBJ_BOOL(1, json_nick, "visible");
- json_nicks = cJSON_GetObjectItem (json_nicklist, "nicks");
+ json_nicks = cJSON_GetObjectItem (json_nicklist_root, "nicks");
CHECK(json_nicks);
CHECK(cJSON_IsArray (json_nicks));
LONGS_EQUAL(1, cJSON_GetArraySize (json_nicks));