summaryrefslogtreecommitdiff
path: root/tests/dbus/proxy-preparation.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dbus/proxy-preparation.c')
-rw-r--r--tests/dbus/proxy-preparation.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/dbus/proxy-preparation.c b/tests/dbus/proxy-preparation.c
index 1ba7acdc..3063d942 100644
--- a/tests/dbus/proxy-preparation.c
+++ b/tests/dbus/proxy-preparation.c
@@ -120,6 +120,26 @@ test_prepare_core (Test *test,
TP_CONNECTION_FEATURE_CAPABILITIES));
}
+static void
+test_depends (Test *test,
+ gconstpointer data G_GNUC_UNUSED)
+{
+ /* Test if A is automatically prepared when preparing B */
+ GQuark features[] = { TP_TESTS_MY_CONN_PROXY_FEATURE_B, 0 };
+
+ tp_proxy_prepare_async (test->my_conn, features, prepare_cb, test);
+
+ g_main_loop_run (test->mainloop);
+ g_assert_no_error (test->error);
+
+ g_assert (tp_proxy_is_prepared (test->my_conn,
+ TP_TESTS_MY_CONN_PROXY_FEATURE_CORE));
+ g_assert (tp_proxy_is_prepared (test->my_conn,
+ TP_TESTS_MY_CONN_PROXY_FEATURE_A));
+ g_assert (tp_proxy_is_prepared (test->my_conn,
+ TP_TESTS_MY_CONN_PROXY_FEATURE_B));
+}
+
int
main (int argc,
char **argv)
@@ -135,6 +155,8 @@ main (int argc,
test_prepare_capabilities, teardown);
g_test_add ("/proxy-preparation/prepare-core", Test, NULL, setup,
test_prepare_core, teardown);
+ g_test_add ("/proxy-preparation/depends", Test, NULL, setup,
+ test_depends, teardown);
return g_test_run ();
}