[libgdata/wip/rishi/drive: 4/11] tests: ODTs are represented by GDataDocumentsDocument in Drive v2



commit 9c2e84b2ed2abb174c7107b354ed9a30fa59b123
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Sep 21 19:41:34 2016 +0200

    tests: ODTs are represented by GDataDocumentsDocument in Drive v2
    
    We are uploading the ODT as a GDataDocumentsDocument, but somehow
    expect it to become a GDataDocumentsText when downloading. That's a
    bit bizarre. More importantly, in Drive v2, only PDFs and
    Drive-specific content types are supposed to be represented by the
    GDataDocumentsDocument sub-classes. Therefore, it is wrong to expect
    an ODT to somehow become a GDataDocumentsText.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684920

 gdata/tests/documents.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gdata/tests/documents.c b/gdata/tests/documents.c
index 4ddb046..f164bef 100644
--- a/gdata/tests/documents.c
+++ b/gdata/tests/documents.c
@@ -1461,6 +1461,11 @@ _test_download_document (GDataDocumentsDocument *document, GDataService *service
                destination_file_extension = "odt";
                download_stream = gdata_documents_document_download (document, GDATA_DOCUMENTS_SERVICE 
(service),
                                                                     GDATA_DOCUMENTS_TEXT_ODT, NULL, &error);
+       } else if (GDATA_IS_DOCUMENTS_DOCUMENT (document)) {
+               /* Text document */
+               destination_file_extension = "odt";
+               download_stream = gdata_documents_document_download (document, GDATA_DOCUMENTS_SERVICE 
(service),
+                                                                    GDATA_DOCUMENTS_TEXT_ODT, NULL, &error);
        } else {
                /* Error! */
                g_assert_not_reached ();


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