about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-01-11 23:09:07 +0000
committerJames Booth <boothj5@gmail.com>2015-01-11 23:09:07 +0000
commit51bd4ed375229d66d1c6957413c724403202ca38 (patch)
treec93617c17cf32d72c3fc4e96aa75ee6467759436 /tests
parent13f0166aa04bce5e64803900d8554c92b6f3c667 (diff)
downloadprofani-tty-51bd4ed375229d66d1c6957413c724403202ca38.tar.gz
Fixed tests
Diffstat (limited to 'tests')
-rw-r--r--tests/test_chat_session.c8
-rw-r--r--tests/test_cmd_disconnect.c4
-rw-r--r--tests/test_server_events.c8
-rw-r--r--tests/ui/stub_ui.c4
4 files changed, 12 insertions, 12 deletions
diff --git a/tests/test_chat_session.c b/tests/test_chat_session.c
index 828be248..b5e1f7b6 100644
--- a/tests/test_chat_session.c
+++ b/tests/test_chat_session.c
@@ -18,7 +18,7 @@ void creates_chat_session_on_recipient_activity(void **state)
     char *barejid = "myjid@server.org";
     char *resource = "tablet";
 
-    chat_session_on_recipient_activity(barejid, resource, FALSE);
+    chat_session_recipient_active(barejid, resource, FALSE);
     ChatSession *session = chat_session_get(barejid);
 
     assert_non_null(session);
@@ -31,8 +31,8 @@ void replaces_chat_session_on_recipient_activity_with_different_resource(void **
     char *resource1 = "tablet";
     char *resource2 = "mobile";
 
-    chat_session_on_recipient_activity(barejid, resource1, FALSE);
-    chat_session_on_recipient_activity(barejid, resource2, FALSE);
+    chat_session_recipient_active(barejid, resource1, FALSE);
+    chat_session_recipient_active(barejid, resource2, FALSE);
     ChatSession *session = chat_session_get(barejid);
 
     assert_string_equal(session->resource, resource2);
@@ -43,7 +43,7 @@ void removes_chat_session(void **state)
     char *barejid = "myjid@server.org";
     char *resource1 = "laptop";
 
-    chat_session_on_recipient_activity(barejid, resource1, FALSE);
+    chat_session_recipient_active(barejid, resource1, FALSE);
     chat_session_remove(barejid);
     ChatSession *session = chat_session_get(barejid);
 
diff --git a/tests/test_cmd_disconnect.c b/tests/test_cmd_disconnect.c
index 2a16c805..68253820 100644
--- a/tests/test_cmd_disconnect.c
+++ b/tests/test_cmd_disconnect.c
@@ -18,8 +18,8 @@ void clears_chat_sessions(void **state)
 
     chat_sessions_init();
     roster_init();
-    chat_session_on_recipient_activity("bob@server.org", "laptop", FALSE);
-    chat_session_on_recipient_activity("mike@server.org", "work", FALSE);
+    chat_session_recipient_active("bob@server.org", "laptop", FALSE);
+    chat_session_recipient_active("mike@server.org", "work", FALSE);
 
     will_return(jabber_get_connection_status, JABBER_CONNECTED);
     will_return(jabber_get_fulljid, "myjid@myserver.com");
diff --git a/tests/test_server_events.c b/tests/test_server_events.c
index bbc1026e..ce54b4f2 100644
--- a/tests/test_server_events.c
+++ b/tests/test_server_events.c
@@ -133,7 +133,7 @@ void handle_message_error_when_recipient_cancel_disables_chat_session(void **sta
 
     prefs_set_boolean(PREF_STATES, TRUE);
     chat_sessions_init();
-    chat_session_on_recipient_activity(barejid, resource, FALSE);
+    chat_session_recipient_active(barejid, resource, FALSE);
 
     handle_message_error(barejid, type, err_msg);
     ChatSession *session = chat_session_get(barejid);
@@ -186,7 +186,7 @@ void handle_offline_removes_chat_session(void **state)
     roster_add(barejid, "bob", NULL, "both", FALSE);
     Resource *resourcep = resource_new(resource, RESOURCE_ONLINE, NULL, 10);
     roster_update_presence(barejid, resourcep, NULL);
-    chat_session_on_recipient_activity(barejid, resource, FALSE);
+    chat_session_recipient_active(barejid, resource, FALSE);
     handle_contact_offline(barejid, resource, NULL);
     ChatSession *session = chat_session_get(barejid);
 
@@ -199,8 +199,8 @@ void handle_offline_removes_chat_session(void **state)
 void lost_connection_clears_chat_sessions(void **state)
 {
     chat_sessions_init();
-    chat_session_on_recipient_activity("bob@server.org", "laptop", FALSE);
-    chat_session_on_recipient_activity("steve@server.org", "mobile", FALSE);
+    chat_session_recipient_active("bob@server.org", "laptop", FALSE);
+    chat_session_recipient_active("steve@server.org", "mobile", FALSE);
     expect_any_cons_show_error();
 
     handle_lost_connection();
diff --git a/tests/ui/stub_ui.c b/tests/ui/stub_ui.c
index b538f27b..296efbee 100644
--- a/tests/ui/stub_ui.c
+++ b/tests/ui/stub_ui.c
@@ -188,12 +188,12 @@ char * ui_ask_password(void)
 void ui_handle_stanza(const char * const msg) {}
 
 // ui events
-void ui_contact_typing(const char * const from) {}
+void ui_contact_typing(const char * const barejid, const char * const resource) {}
 void ui_incoming_msg(const char * const from, const char * const resource, const char * const message, GTimeVal *tv_stamp) {}
 void ui_incoming_private_msg(const char * const fulljid, const char * const message, GTimeVal *tv_stamp) {}
 
 void ui_disconnected(void) {}
-void ui_recipient_gone(const char * const barejid) {}
+void ui_recipient_gone(const char * const barejid, const char * const resource) {}
 
 void ui_outgoing_chat_msg(const char * const from, const char * const barejid,
     const char * const message) {}