From 5b8b9074a294e32cbec5f64f61d867dbf0ca1d51 Mon Sep 17 00:00:00 2001 From: John Hernandez <129467592+H3rnand3zzz@users.noreply.github.com> Date: Thu, 13 Apr 2023 15:23:45 +0200 Subject: Add nickname support for /roster remove Add support of name/nickname instead of only JID for `/roster remove` command. Add tests for it as well. --- tests/functionaltests/test_roster.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'tests/functionaltests/test_roster.c') diff --git a/tests/functionaltests/test_roster.c b/tests/functionaltests/test_roster.c index aa06016e..c16764be 100644 --- a/tests/functionaltests/test_roster.c +++ b/tests/functionaltests/test_roster.c @@ -92,6 +92,35 @@ sends_remove_item(void **state) assert_true(prof_output_exact("Roster item removed: buddy1@localhost")); } +void +sends_remove_item_nick(void **state) +{ + prof_connect_with_roster( + "" + "" + ); + + stbbr_for_query("jabber:iq:roster", + "" + "" + "" + "" + "" + ); + + prof_input("/roster remove Bobby"); + + assert_true(stbbr_received( + "" + "" + "" + "" + "" + )); + + assert_true(prof_output_exact("Roster item removed: buddy1@localhost")); +} + void sends_nick_change(void **state) { -- cgit 1.4.1-2-gfad0