aboutsummaryrefslogblamecommitdiffstats
path: root/tests/check-empathy-chatroom-manager.c
blob: 82cfa6df0fbf61d2589259138eb1d64bdbb5b901 (plain) (tree)
1
2
3
4
5
6
7
8







                             


                                                


                                              











                                                                       
                                        









                                            
                                                          


                                                           
#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 <libempathy/empathy-chatroom-manager.h>

#define CHATROOM_SAMPLE "chatrooms-sample.xml"
#define CHATROOM_FILE "chatrooms.xml"

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 (CHATROOM_SAMPLE);
  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-chatroom-manager");
    tcase_add_test (tc, test_empathy_chatroom_manager_new);
    return tc;
}