4 #include <glib/gstdio.h>
6 #include <gconf/gconf.h>
7 #include <gconf/gconf-client.h>
9 #include "check-helpers.h"
10 #include "check-libempathy.h"
11 #include "check-empathy-helpers.h"
13 #include <libempathy/empathy-chatroom-manager.h>
15 #define CHATROOM_SAMPLE "chatrooms-sample.xml"
16 #define CHATROOM_FILE "chatrooms.xml"
18 START_TEST (test_empathy_chatroom_manager_new)
20 EmpathyChatroomManager *mgr;
25 account = create_test_account ();
27 copy_xml_file (CHATROOM_SAMPLE, CHATROOM_FILE);
29 file = get_user_xml_file (CHATROOM_FILE);
30 /* change the chatrooms XML file to use the account we just created */
31 cmd = g_strdup_printf ("sed -i 's/CHANGE_ME/%s/' %s",
32 mc_account_get_unique_name (account), file);
36 mgr = empathy_chatroom_manager_new (file);
38 fail_if (empathy_chatroom_manager_get_count (mgr, account) != 2);
42 destroy_test_account (account);
47 make_empathy_chatroom_manager_tcase (void)
49 TCase *tc = tcase_create ("empathy-chatroom-manager");
50 tcase_add_test (tc, test_empathy_chatroom_manager_new);