mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
tests: Add a test for g_dbus_connection_get_flags()
It was added in !554 but never had a unit test. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1620
This commit is contained in:
parent
9fc745db07
commit
a01983f94c
@ -1197,6 +1197,7 @@ test_connection_basic (void)
|
||||
GDBusConnection *connection;
|
||||
GError *error;
|
||||
GDBusCapabilityFlags flags;
|
||||
GDBusConnectionFlags connection_flags;
|
||||
gchar *guid;
|
||||
gchar *name;
|
||||
gboolean closed;
|
||||
@ -1215,6 +1216,11 @@ test_connection_basic (void)
|
||||
g_assert (flags == G_DBUS_CAPABILITY_FLAGS_NONE ||
|
||||
flags == G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING);
|
||||
|
||||
connection_flags = g_dbus_connection_get_flags (connection);
|
||||
g_assert_cmpint (connection_flags, ==,
|
||||
G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
|
||||
G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION);
|
||||
|
||||
credentials = g_dbus_connection_get_peer_credentials (connection);
|
||||
g_assert (credentials == NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user