summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2011-09-08 13:47:02 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2011-09-08 13:59:12 +0100
commit6b1487aeda22659d5c3b36bc1a2113ef679f867e (patch)
tree2c97e10a8b6e1723e19b6be53e1240b19ec21a62
parenta9b6205ca39b809e0bbe113e273778413c042e93 (diff)
tests/server-client-{ping,pong}: ensure accounts using the account manager
This means that the client factory created in the account manager will be propagated through to the account and then on to channels, etc. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--telepathy-ytstenut-glib/tests/server-client-ping.c6
-rw-r--r--telepathy-ytstenut-glib/tests/server-client-pong.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/telepathy-ytstenut-glib/tests/server-client-ping.c b/telepathy-ytstenut-glib/tests/server-client-ping.c
index 759919c..d404c44 100644
--- a/telepathy-ytstenut-glib/tests/server-client-ping.c
+++ b/telepathy-ytstenut-glib/tests/server-client-ping.c
@@ -284,6 +284,7 @@ main (int argc,
char **argv)
{
TpDBusDaemon *dbus;
+ TpYtsAccountManager *am;
TpAccount *account;
gchar *path;
@@ -303,8 +304,10 @@ main (int argc,
dbus = tp_dbus_daemon_dup (NULL);
+ am = tp_yts_account_manager_dup ();
+
path = g_strdup_printf ("%s%s", TP_ACCOUNT_OBJECT_PATH_BASE, argv[1]);
- account = tp_account_new (dbus, path, NULL);
+ account = tp_yts_account_manager_ensure_account (am, path, NULL);
g_free (path);
tp_account_prepare_async (account, NULL, account_prepared_cb, NULL);
@@ -315,6 +318,7 @@ main (int argc,
g_main_loop_unref (loop);
g_object_unref (account);
+ g_object_unref (am);
g_object_unref (dbus);
return 0;
diff --git a/telepathy-ytstenut-glib/tests/server-client-pong.c b/telepathy-ytstenut-glib/tests/server-client-pong.c
index 56d3be6..6def2ae 100644
--- a/telepathy-ytstenut-glib/tests/server-client-pong.c
+++ b/telepathy-ytstenut-glib/tests/server-client-pong.c
@@ -127,6 +127,7 @@ main (int argc,
char **argv)
{
TpDBusDaemon *dbus;
+ TpYtsAccountManager *am;
TpAccount *account;
gchar *path;
@@ -141,8 +142,10 @@ main (int argc,
dbus = tp_dbus_daemon_dup (NULL);
+ am = tp_yts_account_manager_dup ();
+
path = g_strdup_printf ("%s%s", TP_ACCOUNT_OBJECT_PATH_BASE, argv[1]);
- account = tp_account_new (dbus, path, NULL);
+ account = tp_yts_account_manager_ensure_account (am, path, NULL);
g_free (path);
tp_account_prepare_async (account, NULL, account_prepared_cb, argv[2]);
@@ -153,6 +156,7 @@ main (int argc,
g_main_loop_unref (loop);
g_object_unref (account);
+ g_object_unref (am);
g_object_unref (dbus);
return 0;