empathy r1563 - trunk/tests
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1563 - trunk/tests
- Date: Mon, 13 Oct 2008 07:54:56 +0000 (UTC)
Author: xclaesse
Date: Mon Oct 13 07:54:56 2008
New Revision: 1563
URL: http://svn.gnome.org/viewvc/empathy?rev=1563&view=rev
Log:
test favorite change
Modified:
trunk/tests/check-empathy-chatroom.c
Modified: trunk/tests/check-empathy-chatroom.c
==============================================================================
--- trunk/tests/check-empathy-chatroom.c (original)
+++ trunk/tests/check-empathy-chatroom.c Mon Oct 13 07:54:56 2008
@@ -114,11 +114,42 @@
}
END_TEST
+static void
+favorite_changed (EmpathyChatroom *chatroom,
+ GParamSpec *spec,
+ gboolean *changed)
+{
+ *changed = TRUE;
+}
+
+START_TEST (test_change_favorite)
+{
+ EmpathyChatroom *chatroom;
+ gboolean changed = FALSE;
+
+ chatroom = create_chatroom ();
+
+ g_signal_connect (chatroom, "notify::favorite", G_CALLBACK (favorite_changed),
+ &changed);
+
+ /* change favorite to TRUE */
+ g_object_set (chatroom, "favorite", TRUE, NULL);
+ fail_if (!changed);
+
+ changed = FALSE;
+
+ /* change favorite to FALSE */
+ g_object_set (chatroom, "favorite", FALSE, NULL);
+ fail_if (!changed);
+}
+END_TEST
+
TCase *
make_empathy_chatroom_tcase (void)
{
TCase *tc = tcase_create ("empathy-chatroom");
tcase_add_test (tc, test_empathy_chatroom_new);
tcase_add_test (tc, test_favorite_and_auto_connect);
+ tcase_add_test (tc, test_change_favorite);
return tc;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]