]> git.0d.be Git - empathy.git/commitdiff
rename remove_account_from_gconf to destroy_test_account and destroy the account...
authorXavier Claessens <xclaesse@src.gnome.org>
Mon, 13 Oct 2008 07:54:29 +0000 (07:54 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Mon, 13 Oct 2008 07:54:29 +0000 (07:54 +0000)
svn path=/trunk/; revision=1555

tests/check-empathy-chatroom-manager.c
tests/check-empathy-chatroom.c
tests/check-empathy-helpers.c
tests/check-empathy-helpers.h

index e340378ce1cf87806334c091354709888e9ebbd3..4c7c882c6cf4c620493a164ff1fc0b42b81008db 100644 (file)
@@ -39,9 +39,7 @@ START_TEST (test_empathy_chatroom_manager_new)
 
   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
 
index f6880312262f09b38d3f99a65d578fa9f5f009d4..e0cb685cb5ba7ce82de6146538fc57d5c475f3e9 100644 (file)
@@ -19,12 +19,6 @@ create_chatroom (void)
   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 @@ START_TEST (test_empathy_chatroom_new)
   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 @@ START_TEST (test_favorite_and_auto_connect)
   fail_if (auto_connect);
   fail_if (favorite);
 
+  destroy_test_account (empathy_chatroom_get_account (chatroom));
   g_object_unref (chatroom);
 }
 END_TEST
index e67483d0d59f9e7b99b4cdf2099c6035901a788c..0946434bdd5e903ec0540fa27be43cfc53f81c92 100644 (file)
@@ -78,7 +78,7 @@ create_test_account (void)
 }
 
 void
-remove_account_from_gconf (McAccount *account)
+destroy_test_account (McAccount *account)
 {
   GConfClient *client;
   gchar *path;
@@ -135,4 +135,7 @@ remove_account_from_gconf (McAccount *account)
 
   g_object_unref (client);
   g_free (path);
+
+  mc_account_delete (account);
+  g_object_unref (account);
 }
index 2434af14b44318c91959102cefc7082e6870ef08..411816bc14aab74c2b012598a6828edf1bfb1dd2 100644 (file)
@@ -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__ */