aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/check-empathy-chatroom-manager.c4
-rw-r--r--tests/check-empathy-chatroom.c8
-rw-r--r--tests/check-empathy-helpers.c5
-rw-r--r--tests/check-empathy-helpers.h2
4 files changed, 8 insertions, 11 deletions
diff --git a/tests/check-empathy-chatroom-manager.c b/tests/check-empathy-chatroom-manager.c
index e340378ce..4c7c882c6 100644
--- a/tests/check-empathy-chatroom-manager.c
+++ b/tests/check-empathy-chatroom-manager.c
@@ -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
diff --git a/tests/check-empathy-chatroom.c b/tests/check-empathy-chatroom.c
index f68803122..e0cb685cb 100644
--- a/tests/check-empathy-chatroom.c
+++ b/tests/check-empathy-chatroom.c
@@ -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
diff --git a/tests/check-empathy-helpers.c b/tests/check-empathy-helpers.c
index e67483d0d..0946434bd 100644
--- a/tests/check-empathy-helpers.c
+++ b/tests/check-empathy-helpers.c
@@ -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);
}
diff --git a/tests/check-empathy-helpers.h b/tests/check-empathy-helpers.h
index 2434af14b..411816bc1 100644
--- a/tests/check-empathy-helpers.h
+++ b/tests/check-empathy-helpers.h
@@ -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__ */