check-empathy-irc-server.c \
check-empathy-irc-network.c \
check-empathy-irc-network-manager.c \
- check-empathy-chatroom.c
+ check-empathy-chatroom.c \
+ check-empathy-irc-chatroom-manager.c
check_main_LDADD = \
@CHECK_LIBS@ \
--- /dev/null
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <glib/gstdio.h>
+
+#include <check.h>
+#include "check-helpers.h"
+#include "check-libempathy.h"
+#include "check-irc-helper.h"
+
+#include <libempathy/empathy-chatroom-manager.h>
+
+static gchar *
+get_xml_file (const gchar *filename)
+{
+ return g_build_filename (g_getenv ("EMPATHY_SRCDIR"), "tests", "xml",
+ filename, NULL);
+}
+
+START_TEST (test_empathy_chatroom_manager_new)
+{
+ EmpathyChatroomManager *mgr;
+ gchar *file;
+
+ file = get_xml_file ("chatrooms.xml");
+ mgr = empathy_chatroom_manager_new (file);
+
+ g_free (file);
+ g_object_unref (mgr);
+}
+END_TEST
+
+TCase *
+make_empathy_chatroom_manager_tcase (void)
+{
+ TCase *tc = tcase_create ("empathy-irc-chatroom-manager");
+ tcase_add_test (tc, test_empathy_chatroom_manager_new);
+ return tc;
+}
TCase * make_empathy_irc_network_tcase (void);
TCase * make_empathy_irc_network_manager_tcase (void);
TCase * make_empathy_chatroom_tcase (void);
+TCase * make_empathy_chatroom_manager_tcase (void);
#endif /* #ifndef __CHECK_LIBEMPATHY__ */
suite_add_tcase (s, make_empathy_irc_network_tcase ());
suite_add_tcase (s, make_empathy_irc_network_manager_tcase ());
suite_add_tcase (s, make_empathy_chatroom_tcase ());
+ suite_add_tcase (s, make_empathy_chatroom_manager_tcase ());
return s;
}
EXTRA_DIST = \
default-irc-networks-sample.xml \
- user-irc-networks-sample.xml
+ user-irc-networks-sample.xml \
+ chatrooms.xml
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<chatrooms/>