]> git.0d.be Git - empathy.git/blob - tests/check-empathy-chatroom-manager.c
move xml/chatrooms.xml to xml/chatrooms-sample.xml
[empathy.git] / tests / check-empathy-chatroom-manager.c
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <string.h>
4 #include <glib/gstdio.h>
5
6 #include <check.h>
7 #include "check-helpers.h"
8 #include "check-libempathy.h"
9
10 #include <libempathy/empathy-chatroom-manager.h>
11
12 #define CHATROOM_SAMPLE "chatrooms-sample.xml"
13 #define CHATROOM_FILE "chatrooms.xml"
14
15 static gchar *
16 get_xml_file (const gchar *filename)
17 {
18   return g_build_filename (g_getenv ("EMPATHY_SRCDIR"), "tests", "xml",
19       filename, NULL);
20 }
21
22 START_TEST (test_empathy_chatroom_manager_new)
23 {
24   EmpathyChatroomManager *mgr;
25   gchar *file;
26
27   file = get_xml_file (CHATROOM_SAMPLE);
28   mgr = empathy_chatroom_manager_new (file);
29
30   g_free (file);
31   g_object_unref (mgr);
32 }
33 END_TEST
34
35 TCase *
36 make_empathy_chatroom_manager_tcase (void)
37 {
38     TCase *tc = tcase_create ("empathy-chatroom-manager");
39     tcase_add_test (tc, test_empathy_chatroom_manager_new);
40     return tc;
41 }