summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartyn Russell <martyn@lanedo.com>2014-09-10 11:26:11 +0100
committerMartyn Russell <martyn@lanedo.com>2014-10-17 11:59:34 +0100
commitd5c0a9ac46eaa10e54518907ff63c9c60d57b2fe (patch)
tree60b2ea721c3a019e3eb78ebd98f2bf8905961066 /tests
parentfa9a183d8bad3a3f41b985517f7dcf7cc37c3d85 (diff)
downloadlibmediaart-d5c0a9ac46eaa10e54518907ff63c9c60d57b2fe.tar.gz
cache: Added media_art_remove_async() and _finish()
Part of this API changes makes the media_art_get_{path|file}() APIs not do i/o operations like creating the cache directory. This is now done in media_art_process_new(). https://bugzilla.gnome.org/show_bug.cgi?id=724879
Diffstat (limited to 'tests')
-rw-r--r--tests/mediaarttest.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/mediaarttest.c b/tests/mediaarttest.c
index f93845c..fb03d6a 100644
--- a/tests/mediaarttest.c
+++ b/tests/mediaarttest.c
@@ -362,6 +362,7 @@ test_mediaart_process_buffer (void)
GCancellable *cancellable;
GFile *file;
GError *error = NULL;
+ gchar *dir;
gchar *path;
gchar *out_path = NULL;
gchar *out_uri = NULL;
@@ -377,17 +378,22 @@ test_mediaart_process_buffer (void)
media_art_get_path ("Lanedo", /* artist / title */
NULL, /* album */
NULL, /* prefix */
- path,
- &out_path,
- &out_uri);
+ path,
+ &out_path,
+ &out_uri);
g_assert_false (g_file_test (out_path, G_FILE_TEST_EXISTS));
g_free (out_path);
g_free (out_uri);
+ /* Creates media-art cache dir if it doesn't exist ... */
process = media_art_process_new (&error);
g_assert_no_error (error);
g_assert_nonnull (process);
+ dir = g_build_filename (g_get_user_cache_dir (), "media-art", NULL);
+ g_assert_true (g_file_test (dir, G_FILE_TEST_EXISTS));
+ g_free (dir);
+
ml = g_main_loop_new (NULL, FALSE);
/* Process data */