diff options
author | Ted Gould <ted@gould.cx> | 2015-01-30 10:02:45 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2015-01-30 10:02:45 -0600 |
commit | 7746f13ca38f67ea1b0c81fdb2ff43b764f0efa0 (patch) | |
tree | c550e9c4bb63bcc4fa9273186c397f08aa4424a0 /tests/media-player-user.cc | |
parent | e4ee5134da0cf9656db9ea201f2b7b53e92ac1b7 (diff) | |
download | ayatana-indicator-sound-7746f13ca38f67ea1b0c81fdb2ff43b764f0efa0.tar.gz ayatana-indicator-sound-7746f13ca38f67ea1b0c81fdb2ff43b764f0efa0.tar.bz2 ayatana-indicator-sound-7746f13ca38f67ea1b0c81fdb2ff43b764f0efa0.zip |
Making the account service testing all system bus, becuase well, it should be.
Diffstat (limited to 'tests/media-player-user.cc')
-rw-r--r-- | tests/media-player-user.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/media-player-user.cc b/tests/media-player-user.cc index 9214961..a402f90 100644 --- a/tests/media-player-user.cc +++ b/tests/media-player-user.cc @@ -34,28 +34,22 @@ class MediaPlayerUserTest : public ::testing::Test DbusTestService * service = NULL; AccountsServiceMock service_mock; - GDBusConnection * session = NULL; GDBusConnection * system = NULL; GDBusProxy * proxy = NULL; virtual void SetUp() { service = dbus_test_service_new(NULL); - dbus_test_service_set_bus(service, DBUS_TEST_SERVICE_BUS_BOTH); + dbus_test_service_set_bus(service, DBUS_TEST_SERVICE_BUS_SYSTEM); dbus_test_service_add_task(service, (DbusTestTask*)service_mock); dbus_test_service_start_tasks(service); - session = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, NULL); - ASSERT_NE(nullptr, session); - g_dbus_connection_set_exit_on_close(session, FALSE); - g_object_add_weak_pointer(G_OBJECT(session), (gpointer *)&session); - system = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, NULL); ASSERT_NE(nullptr, system); g_dbus_connection_set_exit_on_close(system, FALSE); g_object_add_weak_pointer(G_OBJECT(system), (gpointer *)&system); - proxy = g_dbus_proxy_new_sync(session, + proxy = g_dbus_proxy_new_sync(system, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.freedesktop.Accounts", @@ -69,7 +63,6 @@ class MediaPlayerUserTest : public ::testing::Test g_clear_object(&proxy); g_clear_object(&service); - g_object_unref(session); g_object_unref(system); #if 0 |