summaryrefslogtreecommitdiff
path: root/tests/dbus/test-log-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dbus/test-log-manager.c')
-rw-r--r--tests/dbus/test-log-manager.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/dbus/test-log-manager.c b/tests/dbus/test-log-manager.c
index 36736da..464537b 100644
--- a/tests/dbus/test-log-manager.c
+++ b/tests/dbus/test-log-manager.c
@@ -232,6 +232,27 @@ setup_debug (void)
static void
+test_exists (TestCaseFixture *fixture,
+ gconstpointer user_data)
+{
+ TplEntity *entity;
+ TplEntity *no_entity;
+
+ entity = tpl_entity_new (ID, TPL_ENTITY_CONTACT, NULL, NULL);
+ no_entity = tpl_entity_new ("unknown", TPL_ENTITY_CONTACT, NULL, NULL);
+
+ g_assert (tpl_log_manager_exists (fixture->manager, fixture->account,
+ entity, TPL_EVENT_MASK_ANY));
+
+ g_assert (!tpl_log_manager_exists (fixture->manager, fixture->account,
+ no_entity, TPL_EVENT_MASK_ANY));
+
+ g_object_unref (entity);
+ g_object_unref (no_entity);
+}
+
+
+static void
get_dates_async_cb (GObject *object,
GAsyncResult *result,
gpointer user_data)
@@ -390,6 +411,10 @@ main (int argc, char **argv)
g_hash_table_insert (params, "account-path",
tp_g_value_slice_new_static_string (ACCOUNT_PATH_JABBER));
+ g_test_add ("/log-manager/exists",
+ TestCaseFixture, params,
+ setup, test_exists, teardown);
+
g_test_add ("/log-manager/get-dates",
TestCaseFixture, params,
setup, test_get_dates, teardown);