[libgdata] tests: Make metadata-only uploads work with Drive v2



commit c5223bffa57915f4c9f86580804dcfc7ebe31e2d
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Nov 20 17:40:18 2015 +0100

    tests: Make metadata-only uploads work with Drive v2
    
    Same issue as folder creation. See
    a9c8516b4380a213cd92d83a11f9793414588319 for the rationale.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684920

 gdata/tests/documents.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/gdata/tests/documents.c b/gdata/tests/documents.c
index 739e1bf..5c37d29 100644
--- a/gdata/tests/documents.c
+++ b/gdata/tests/documents.c
@@ -775,15 +775,9 @@ test_upload (UploadDocumentData *data, gconstpointer _test_params)
        }
 
        if (test_params->payload_type == UPLOAD_METADATA_ONLY) {
-               gchar *upload_uri;
-
-               /* Insert the document */
-               upload_uri = gdata_documents_service_get_upload_uri (data->folder);
-               data->new_document = GDATA_DOCUMENTS_DOCUMENT (gdata_service_insert_entry (GDATA_SERVICE 
(test_params->service),
-                                                                                          
gdata_documents_service_get_primary_authorization_domain (),
-                                                                                          upload_uri, 
GDATA_ENTRY (document), NULL, &error));
-               g_free (upload_uri);
-
+               data->new_document = GDATA_DOCUMENTS_DOCUMENT (gdata_documents_service_add_entry_to_folder 
(test_params->service,
+                                                                                                           
GDATA_DOCUMENTS_ENTRY (document),
+                                                                                                           
data->folder, NULL, &error));
                g_assert_no_error (error);
        } else {
                GDataUploadStream *upload_stream;


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