aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check-empathy-irc-server.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <gdesmott@gnome.org>2008-01-06 21:06:11 +0800
committerGuillaume Desmottes <gdesmott@gnome.org>2008-01-06 21:06:11 +0800
commitc9591bab3699eaae01d603d0b152fdbe9f8f6fad (patch)
treea2903a19781897ba46713a7239b8da9eec58ddcf /tests/check-empathy-irc-server.c
parent60dd2703f835a3fc7c1c78a94727a4ee241a0217 (diff)
downloadgsoc2013-empathy-c9591bab3699eaae01d603d0b152fdbe9f8f6fad.tar
gsoc2013-empathy-c9591bab3699eaae01d603d0b152fdbe9f8f6fad.tar.gz
gsoc2013-empathy-c9591bab3699eaae01d603d0b152fdbe9f8f6fad.tar.bz2
gsoc2013-empathy-c9591bab3699eaae01d603d0b152fdbe9f8f6fad.tar.lz
gsoc2013-empathy-c9591bab3699eaae01d603d0b152fdbe9f8f6fad.tar.xz
gsoc2013-empathy-c9591bab3699eaae01d603d0b152fdbe9f8f6fad.tar.zst
gsoc2013-empathy-c9591bab3699eaae01d603d0b152fdbe9f8f6fad.zip
check-empathy-irc-server.c: test the modified signal
Diffstat (limited to 'tests/check-empathy-irc-server.c')
-rw-r--r--tests/check-empathy-irc-server.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/check-empathy-irc-server.c b/tests/check-empathy-irc-server.c
index ab34e9777..bed7b8d0b 100644
--- a/tests/check-empathy-irc-server.c
+++ b/tests/check-empathy-irc-server.c
@@ -65,11 +65,55 @@ START_TEST (test_property_change)
}
END_TEST
+gboolean modified = FALSE;
+
+static void
+modified_cb (EmpathyIrcServer *server,
+ gpointer unused)
+{
+ modified = TRUE;
+}
+
+START_TEST (test_modified_signal)
+{
+ EmpathyIrcServer *server;
+
+ server = empathy_irc_server_new ("test.localhost", 6667, TRUE);
+ fail_if (server == NULL);
+
+ g_signal_connect (server, "modified", G_CALLBACK (modified_cb), NULL);
+
+ /* address */
+ g_object_set (server, "address", "test2.localhost", NULL);
+ fail_if (!modified);
+ modified = FALSE;
+ g_object_set (server, "address", "test2.localhost", NULL);
+ fail_if (modified);
+
+ /* port */
+ g_object_set (server, "port", 6668, NULL);
+ fail_if (!modified);
+ modified = FALSE;
+ g_object_set (server, "port", 6668, NULL);
+ fail_if (modified);
+
+ /* ssl */
+ g_object_set (server, "ssl", FALSE, NULL);
+ fail_if (!modified);
+ modified = FALSE;
+ g_object_set (server, "ssl", FALSE, NULL);
+ fail_if (modified);
+
+ g_object_unref (server);
+}
+END_TEST
+
TCase *
make_empathy_irc_server_tcase (void)
{
TCase *tc = tcase_create ("empathy-irc-server");
tcase_add_test (tc, test_empathy_irc_server_new);
tcase_add_test (tc, test_property_change);
+ tcase_add_test (tc, test_modified_signal);
return tc;
}