aboutsummaryrefslogtreecommitdiff
path: root/tests/backend-dbus
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-06-25 11:39:46 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-06-25 11:39:46 -0500
commitd16aaaed46f3381ea7ac4cb4c2cb491d4c5d2e03 (patch)
treeb970bd51afd67a77ab5de3780204b8528876e7ab /tests/backend-dbus
parentb3938a1f14b687d62ad1d6e4e27bac47f58722de (diff)
downloadayatana-indicator-session-d16aaaed46f3381ea7ac4cb4c2cb491d4c5d2e03.tar.gz
ayatana-indicator-session-d16aaaed46f3381ea7ac4cb4c2cb491d4c5d2e03.tar.bz2
ayatana-indicator-session-d16aaaed46f3381ea7ac4cb4c2cb491d4c5d2e03.zip
all the tests in test-users pass
Diffstat (limited to 'tests/backend-dbus')
-rw-r--r--tests/backend-dbus/test-users.cc20
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/backend-dbus/test-users.cc b/tests/backend-dbus/test-users.cc
index 279796e..b022984 100644
--- a/tests/backend-dbus/test-users.cc
+++ b/tests/backend-dbus/test-users.cc
@@ -328,26 +328,25 @@ TEST_F (Users, ActivateUser)
compare_user (msmith, event_keys[1], "active");
}
-#if 0
/**
* Confirm that adding a Guest doesn't show up in the users list
*/
TEST_F (Users, UnwantedGuest)
{
- GStrv keys;
+ GList * uids;
- keys = indicator_session_users_get_keys (users);
- const size_t n = g_strv_length (keys);
- g_strfreev (keys);
+ uids = indicator_session_users_get_uids (users);
+ const size_t n = g_list_length (uids);
+ g_list_free (uids);
MockUser * mu = new MockUser (loop, conn, "guest-jjbEVV", "Guest", 1);
mu->set_system_account (true);
accounts->add_user (mu);
wait_msec (50);
- keys = indicator_session_users_get_keys (users);
- ASSERT_EQ (n, g_strv_length (keys));
- g_strfreev (keys);
+ uids = indicator_session_users_get_uids (users);
+ ASSERT_EQ (n, g_list_length (uids));
+ g_list_free (uids);
}
@@ -367,9 +366,9 @@ TEST_F (Users, LiveSession)
MockUser * live_user = new MockUser (loop, conn, "ubuntu", "Ubuntu", 1, 999);
live_user->set_system_account (true);
accounts->add_user (live_user);
- MockConsoleKitSession * session = ck_seat->add_session_by_user (live_user);
+ const int session_tag = login1_manager->add_session (login1_seat, live_user);
wait_msec (100);
- ck_seat->activate_session (session);
+ login1_seat->activate_session (session_tag);
wait_for_signal (users, "notify::" INDICATOR_SESSION_USERS_PROP_IS_LIVE_SESSION);
// confirm the backend thinks it's a live session
@@ -377,4 +376,3 @@ TEST_F (Users, LiveSession)
g_object_get (users, INDICATOR_SESSION_USERS_PROP_IS_LIVE_SESSION, &b, NULL);
ASSERT_TRUE (b);
}
-#endif