diff options
author | Debarshi Ray <debarshir@gnome.org> | 2016-09-21 19:41:34 +0200 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2018-08-13 17:47:29 +0200 |
commit | cc2bd43264294e9c98452c0f548aae5df843be55 (patch) | |
tree | bd6b02e834b86a497975c6b5f27cf71389a40c40 | |
parent | 81128bd6ac1a28f5b72f0e70caaf2038c55472ad (diff) | |
download | libgdata-cc2bd43264294e9c98452c0f548aae5df843be55.tar.gz |
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
-rw-r--r-- | 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 4ddb0468..f164bef9 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 (); |