aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check-empathy-chatroom.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-10-13 15:54:56 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-10-13 15:54:56 +0800
commitf1520d6a028a5c615d26d4e61f03603cb7dbd3db (patch)
tree539839d53aa4f1d0b7b0ba0ea1c511370a5f4a45 /tests/check-empathy-chatroom.c
parent150cf08690672b4cf6c44ef58619290889644920 (diff)
downloadgsoc2013-empathy-f1520d6a028a5c615d26d4e61f03603cb7dbd3db.tar
gsoc2013-empathy-f1520d6a028a5c615d26d4e61f03603cb7dbd3db.tar.gz
gsoc2013-empathy-f1520d6a028a5c615d26d4e61f03603cb7dbd3db.tar.bz2
gsoc2013-empathy-f1520d6a028a5c615d26d4e61f03603cb7dbd3db.tar.lz
gsoc2013-empathy-f1520d6a028a5c615d26d4e61f03603cb7dbd3db.tar.xz
gsoc2013-empathy-f1520d6a028a5c615d26d4e61f03603cb7dbd3db.tar.zst
gsoc2013-empathy-f1520d6a028a5c615d26d4e61f03603cb7dbd3db.zip
test favorite change
svn path=/trunk/; revision=1563
Diffstat (limited to 'tests/check-empathy-chatroom.c')
-rw-r--r--tests/check-empathy-chatroom.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/check-empathy-chatroom.c b/tests/check-empathy-chatroom.c
index e0cb685cb..af8687cf3 100644
--- a/tests/check-empathy-chatroom.c
+++ b/tests/check-empathy-chatroom.c
@@ -114,11 +114,42 @@ START_TEST (test_favorite_and_auto_connect)
}
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;
}