telepathy-logger: test-tpl-log-store: test end reasons

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Mon Sep 30 05:06:33 PDT 2013


Module: telepathy-logger
Branch: master
Commit: 04ac64efc5cb8f54f0e9ca0672c11623e70ff609
URL:    http://cgit.freedesktop.org/telepathy/telepathy-logger/commit/?id=04ac64efc5cb8f54f0e9ca0672c11623e70ff609

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Mon Sep 30 12:09:40 2013 +0200

test-tpl-log-store: test end reasons

---

 tests/dbus/test-tpl-log-store-xml.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/tests/dbus/test-tpl-log-store-xml.c b/tests/dbus/test-tpl-log-store-xml.c
index 11e841d..e2bd4d8 100644
--- a/tests/dbus/test-tpl-log-store-xml.c
+++ b/tests/dbus/test-tpl-log-store-xml.c
@@ -974,16 +974,31 @@ test_get_events_for_date (XmlTestCaseFixture *fixture,
   g_assert_cmpint (
       tpl_call_event_get_duration (TPL_CALL_EVENT (g_list_nth_data (events, idx))),
       ==, 1);
+  g_assert_cmpint (
+      tpl_call_event_get_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))),
+      ==, TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED);
+  g_assert_cmpstr (tpl_call_event_get_detailed_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))),
+      ==, TP_ERROR_STR_CANCELLED);
 
   g_assert (TPL_IS_CALL_EVENT (g_list_nth_data (events, ++idx)));
   g_assert_cmpint (
       tpl_call_event_get_duration (TPL_CALL_EVENT (g_list_nth_data (events, idx))),
       ==, 2);
+  g_assert_cmpint (
+      tpl_call_event_get_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))),
+      ==, TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED);
+  g_assert_cmpstr (tpl_call_event_get_detailed_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))),
+      ==, TP_ERROR_STR_CANCELLED);
 
   g_assert (TPL_IS_CALL_EVENT (g_list_nth_data (events, ++idx)));
   g_assert_cmpint (
       tpl_call_event_get_duration (TPL_CALL_EVENT (g_list_nth_data (events, idx))),
       ==, 3);
+  g_assert_cmpint (
+      tpl_call_event_get_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))),
+      ==, TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED);
+  g_assert_cmpstr (tpl_call_event_get_detailed_end_reason (TPL_CALL_EVENT (g_list_nth_data (events, idx))),
+      ==, TP_ERROR_STR_CANCELLED);
 
   g_assert (TPL_IS_TEXT_EVENT (g_list_nth_data (events, ++idx)));
   g_assert_cmpstr (



More information about the telepathy-commits mailing list