aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check-empathy-chatroom-manager.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-10-13 15:54:15 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-10-13 15:54:15 +0800
commit566da7c05622e1463ef84967a2b81c295c113812 (patch)
tree02a5881fced2a0c05fbe6ccf71672970897ef489 /tests/check-empathy-chatroom-manager.c
parent9d665ed41b2df20bd14a058d9a85c387a4a0f885 (diff)
downloadgsoc2013-empathy-566da7c05622e1463ef84967a2b81c295c113812.tar
gsoc2013-empathy-566da7c05622e1463ef84967a2b81c295c113812.tar.gz
gsoc2013-empathy-566da7c05622e1463ef84967a2b81c295c113812.tar.bz2
gsoc2013-empathy-566da7c05622e1463ef84967a2b81c295c113812.tar.lz
gsoc2013-empathy-566da7c05622e1463ef84967a2b81c295c113812.tar.xz
gsoc2013-empathy-566da7c05622e1463ef84967a2b81c295c113812.tar.zst
gsoc2013-empathy-566da7c05622e1463ef84967a2b81c295c113812.zip
load the chatrooms sample XML file
svn path=/trunk/; revision=1552
Diffstat (limited to 'tests/check-empathy-chatroom-manager.c')
-rw-r--r--tests/check-empathy-chatroom-manager.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/check-empathy-chatroom-manager.c b/tests/check-empathy-chatroom-manager.c
index fbeb9bae1..84ac32233 100644
--- a/tests/check-empathy-chatroom-manager.c
+++ b/tests/check-empathy-chatroom-manager.c
@@ -15,14 +15,33 @@
START_TEST (test_empathy_chatroom_manager_new)
{
EmpathyChatroomManager *mgr;
+ gchar *cmd;
gchar *file;
+ McProfile *profile;
+ McAccount *account;
+
+ profile = mc_profile_lookup ("test");
+ account = mc_account_create (profile);
copy_xml_file (CHATROOM_SAMPLE, CHATROOM_FILE);
- file = get_xml_file (CHATROOM_FILE);
+
+ file = get_user_xml_file (CHATROOM_FILE);
+ /* change the chatrooms XML file to use the account we just created */
+ cmd = g_strdup_printf ("sed -i 's/CHANGE_ME/%s/' %s",
+ mc_account_get_unique_name (account), file);
+ system (cmd);
+ g_free (cmd);
+
mgr = empathy_chatroom_manager_new (file);
+ fail_if (empathy_chatroom_manager_get_count (mgr, account) != 2);
+
g_free (file);
g_object_unref (mgr);
+ g_object_unref (profile);
+ remove_account_from_gconf (account);
+ mc_account_delete (account);
+ g_object_unref (account);
}
END_TEST