summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-09-30 12:09:40 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-09-30 14:05:59 +0200
commit04ac64efc5cb8f54f0e9ca0672c11623e70ff609 (patch)
tree96e0e2d8793bef6d741e97f4b373c031374234f1
parent87eb595b7e5b091e106f0f1893e32a8d9d568915 (diff)
downloadtelepathy-logger-04ac64efc5cb8f54f0e9ca0672c11623e70ff609.tar.gz
test-tpl-log-store: test end reasons
-rw-r--r--tests/dbus/test-tpl-log-store-xml.c15
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 (