about summary refs log tree commit diff stats
path: root/tests/unittests/test_cmd_roster.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix memory leak in unittestsDmitry Podgorny2019-10-141-0/+1
|
* Fix invalid reads in unit testsMichael Vetter2019-10-101-2/+0
|
* Revert "Free lits in test_cmd_roster unittest"Michael Vetter2019-10-101-1/+0
| | | | | | This reverts commit 5b19ed28ce6f8bd8f46248de612f7ed466dc7a73. This caused a segfault.
* First destroy roster then free list in test_cmd_rosterMichael Vetter2019-10-061-3/+3
|
* Free lits in test_cmd_roster unittestMichael Vetter2019-10-061-0/+4
| | | | Regards https://github.com/profanity-im/profanity/issues/1019
* Moved roster_list.cJames Booth2016-07-241-1/+1
|
* Rename command sourcesJames Booth2016-05-221-1/+1
|
* Remove JABBER_STARTED, JABBER_UNDEFINED connection statesJames Booth2016-05-101-5/+0
|
* Add session.cJames Booth2016-05-051-13/+13
|
* Removed unused arg from roster_get_ functionsJames Booth2016-01-311-1/+1
|
* Added roster struct, create and destroy roster on connect/disconnectJames Booth2016-01-051-12/+12
|
* Pass offline filter to roster_get_contactsJames Booth2015-11-181-1/+1
|
* Pass ordering to roster list functionsJames Booth2015-11-181-1/+1
|
* Fixed tests for new command formatJames Booth2015-07-271-60/+20
|
* Added current window reference to command functionsJames Booth2015-06-171-13/+13
|
* Set columns when running functional testsJames Booth2015-06-131-1/+2
|
* Moved all tests to tests folderJames Booth2015-06-121-0/+279

                                                                            






                                                                        


                                                                               

                                                 
                             

                                                                            
 
                                

                                                                                      
 
      
#ifndef MOCK_XMPP_H
#define MOCK_XMPP_H

#include "xmpp/xmpp.h"

void mock_connection_status(jabber_conn_status_t status);
void mock_connection_account_name(char *name);
void mock_connection_presence_message(char *message);
void expect_room_list_request(char *conf_server);

void mock_jabber_connect_with_details(void);
void jabber_connect_with_details_expect_and_return(char *jid,
    char *password, char *altdomain, int port, jabber_conn_status_t result);
void jabber_connect_with_details_return(jabber_conn_status_t result);

void mock_jabber_connect_with_account(void);
void jabber_connect_with_account_expect_and_return(ProfAccount *account,
    jabber_conn_status_t result);
void jabber_connect_with_account_return(jabber_conn_status_t result);

void mock_presence_update(void);
void presence_update_expect(resource_presence_t presence, char *msg, int idle);

void bookmark_get_list_returns(GList *bookmarks);

void mock_bookmark_add(void);
void expect_and_return_bookmark_add(char *expected_jid, char *expected_nick,
    gboolean expected_autojoin, gboolean added);

void mock_bookmark_remove(void);
void expect_and_return_bookmark_remove(char *expected_jid, gboolean expected_autojoin,
    gboolean removed);

#endif