aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-10-13 15:54:15 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-10-13 15:54:15 +0800
commitec140d720321f92f59c026a6e59c595d70599438 (patch)
tree02a5881fced2a0c05fbe6ccf71672970897ef489 /tests
parentee84d4b1c5b3a1b1285473b543d14d63d9a4712c (diff)
downloadgsoc2013-empathy-ec140d720321f92f59c026a6e59c595d70599438.tar
gsoc2013-empathy-ec140d720321f92f59c026a6e59c595d70599438.tar.gz
gsoc2013-empathy-ec140d720321f92f59c026a6e59c595d70599438.tar.bz2
gsoc2013-empathy-ec140d720321f92f59c026a6e59c595d70599438.tar.lz
gsoc2013-empathy-ec140d720321f92f59c026a6e59c595d70599438.tar.xz
gsoc2013-empathy-ec140d720321f92f59c026a6e59c595d70599438.tar.zst
gsoc2013-empathy-ec140d720321f92f59c026a6e59c595d70599438.zip
load the chatrooms sample XML file
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1552 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'tests')
-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