about summary refs log tree commit diff stats
path: root/tests/unittests
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-06-09 15:45:09 +0200
committerMichael Vetter <jubalh@iodoru.org>2021-06-09 15:53:21 +0200
commit8ef35290bdde58c6a0e7231c1870152f946d78e0 (patch)
tree4bdebbc7cd297460d76603667b90a5993b7ad46b /tests/unittests
parentd7adec69cefedce8949ead1309e9a8e56a8c4d8f (diff)
downloadprofani-tty-8ef35290bdde58c6a0e7231c1870152f946d78e0.tar.gz
Add command to show single bookmark details
`/bookmark list` lists all bookmarks with its details.
`/bookmark list <jid>` shows the details of a single bookmark.

Implement https://github.com/profanity-im/profanity/issues/1558
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/ui/stub_ui.c5
-rw-r--r--tests/unittests/xmpp/stub_xmpp.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c
index 578ebcda..1cae8bde 100644
--- a/tests/unittests/ui/stub_ui.c
+++ b/tests/unittests/ui/stub_ui.c
@@ -908,6 +908,11 @@ cons_show_bookmarks(const GList* list)
 }
 
 void
+cons_show_bookmark(Bookmark* item)
+{
+}
+
+void
 cons_show_disco_items(GSList* items, const char* const jid)
 {
 }
diff --git a/tests/unittests/xmpp/stub_xmpp.c b/tests/unittests/xmpp/stub_xmpp.c
index cffaae7f..ba72024c 100644
--- a/tests/unittests/xmpp/stub_xmpp.c
+++ b/tests/unittests/xmpp/stub_xmpp.c
@@ -487,6 +487,12 @@ bookmark_get_list(void)
     return mock_ptr_type(GList*);
 }
 
+Bookmark*
+bookmark_get_by_jid(const char* jid)
+{
+    return NULL;
+}
+
 char*
 bookmark_find(const char* const search_str, gboolean previous, void* context)
 {