aboutsummaryrefslogtreecommitdiffstats
path: root/tests/xmpp
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-02-02 00:37:37 +0000
committerJames Booth <boothj5@gmail.com>2014-02-02 00:37:37 +0000
commita8ecbccc9c29a4d9b0ba21fa0a7b6e804f226626 (patch)
treef373ffe559cbf231f9721023cd70cc7cd80e553e /tests/xmpp
parent38d8d8d98410bd6d39d8f90cb94d7e88f3d06727 (diff)
downloadprofani-tty-a8ecbccc9c29a4d9b0ba21fa0a7b6e804f226626.tar.gz
Added /bookmark remove tests
Diffstat (limited to 'tests/xmpp')
-rw-r--r--tests/xmpp/mock_xmpp.c20
-rw-r--r--tests/xmpp/mock_xmpp.h3
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/xmpp/mock_xmpp.c b/tests/xmpp/mock_xmpp.c
index d6518322..80b1a3e7 100644
--- a/tests/xmpp/mock_xmpp.c
+++ b/tests/xmpp/mock_xmpp.c
@@ -72,6 +72,13 @@ _mock_bookmark_add(const char *jid, const char *nick, gboolean autojoin)
check_expected(autojoin);
}
+static void
+_mock_bookmark_remove(const char *jid, gboolean autojoin)
+{
+ check_expected(jid);
+ check_expected(autojoin);
+}
+
void
mock_jabber_connect_with_details(void)
{
@@ -104,6 +111,12 @@ mock_bookmark_add(void)
}
void
+mock_bookmark_remove(void)
+{
+ bookmark_remove = _mock_bookmark_remove;
+}
+
+void
bookmark_get_list_returns(GList *bookmarks)
{
bookmark_get_list = _mock_bookmark_get_list;
@@ -191,3 +204,10 @@ expect_bookmark_add(char *expected_jid, char *expected_nick, gboolean expected_a
}
expect_value(_mock_bookmark_add, autojoin, expected_autojoin);
}
+
+void
+expect_bookmark_remove(char *expected_jid, gboolean expected_autojoin)
+{
+ expect_string(_mock_bookmark_remove, jid, expected_jid);
+ expect_value(_mock_bookmark_remove, autojoin, expected_autojoin);
+}
diff --git a/tests/xmpp/mock_xmpp.h b/tests/xmpp/mock_xmpp.h
index b3da50d4..12862d51 100644
--- a/tests/xmpp/mock_xmpp.h
+++ b/tests/xmpp/mock_xmpp.h
@@ -26,4 +26,7 @@ void bookmark_get_list_returns(GList *bookmarks);
void mock_bookmark_add(void);
void expect_bookmark_add(char *expected_jid, char *expected_nick, gboolean expected_autojoin);
+void mock_bookmark_remove(void);
+void expect_bookmark_remove(char *expected_jid, gboolean expected_autojoin);
+
#endif