empathy r1555 - trunk/tests



Author: xclaesse
Date: Mon Oct 13 07:54:29 2008
New Revision: 1555
URL: http://svn.gnome.org/viewvc/empathy?rev=1555&view=rev

Log:
rename remove_account_from_gconf to destroy_test_account and destroy the account object in it

Modified:
   trunk/tests/check-empathy-chatroom-manager.c
   trunk/tests/check-empathy-chatroom.c
   trunk/tests/check-empathy-helpers.c
   trunk/tests/check-empathy-helpers.h

Modified: trunk/tests/check-empathy-chatroom-manager.c
==============================================================================
--- trunk/tests/check-empathy-chatroom-manager.c	(original)
+++ trunk/tests/check-empathy-chatroom-manager.c	Mon Oct 13 07:54:29 2008
@@ -39,9 +39,7 @@
 
   g_free (file);
   g_object_unref (mgr);
-  remove_account_from_gconf (account);
-  mc_account_delete (account);
-  g_object_unref (account);
+  destroy_test_account (account);
 }
 END_TEST
 

Modified: trunk/tests/check-empathy-chatroom.c
==============================================================================
--- trunk/tests/check-empathy-chatroom.c	(original)
+++ trunk/tests/check-empathy-chatroom.c	Mon Oct 13 07:54:29 2008
@@ -19,12 +19,6 @@
   chatroom = empathy_chatroom_new (account);
   fail_if (chatroom == NULL);
 
-  /* destroy the account as we don't have to add it to the accounts
-   * configuration */
-  /* FIXME: the account is not really removed */
-  mc_account_delete (account);
-  g_object_unref (account);
-
   return chatroom;
 }
 
@@ -42,6 +36,7 @@
   fail_if (auto_connect);
   fail_if (favorite);
 
+  destroy_test_account (empathy_chatroom_get_account (chatroom));
   g_object_unref (chatroom);
 }
 END_TEST
@@ -114,6 +109,7 @@
   fail_if (auto_connect);
   fail_if (favorite);
 
+  destroy_test_account (empathy_chatroom_get_account (chatroom));
   g_object_unref (chatroom);
 }
 END_TEST

Modified: trunk/tests/check-empathy-helpers.c
==============================================================================
--- trunk/tests/check-empathy-helpers.c	(original)
+++ trunk/tests/check-empathy-helpers.c	Mon Oct 13 07:54:29 2008
@@ -78,7 +78,7 @@
 }
 
 void
-remove_account_from_gconf (McAccount *account)
+destroy_test_account (McAccount *account)
 {
   GConfClient *client;
   gchar *path;
@@ -135,4 +135,7 @@
 
   g_object_unref (client);
   g_free (path);
+
+  mc_account_delete (account);
+  g_object_unref (account);
 }

Modified: trunk/tests/check-empathy-helpers.h
==============================================================================
--- trunk/tests/check-empathy-helpers.h	(original)
+++ trunk/tests/check-empathy-helpers.h	Mon Oct 13 07:54:29 2008
@@ -25,7 +25,7 @@
 gchar * get_xml_file (const gchar *filename);
 gchar * get_user_xml_file (const gchar *filename);
 void copy_xml_file (const gchar *orig, const gchar *dest);
-void remove_account_from_gconf (McAccount *account);
 McAccount * create_test_account (void);
+void destroy_test_account (McAccount *account);
 
 #endif /* #ifndef __CHECK_EMPATHY_HELPERS_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]