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:
Philip Withnall 2019-08-21 19:47:38 +03:00
parent 9fc745db07
commit a01983f94c

View File

@ -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);