[libgdata/wip/rishi/drive: 6/8] tests: ODTs are represented by GDataDocumentsDocument in Drive v2
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata/wip/rishi/drive: 6/8] tests: ODTs are represented by GDataDocumentsDocument in Drive v2
- Date: Fri, 23 Sep 2016 13:32:20 +0000 (UTC)
commit 64f8cdd9e21e4089b408e7c297f8233ddc90a428
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Sep 23 15:21:22 2016 +0200
tests: ODTs are represented by GDataDocumentsDocument in Drive v2
GDataDocumentText is bound to application/vnd.google-apps.document,
which represents native Drive-specific text documents. Anything that's
not a Drive-specific type, except PDFs, are meant to be represented as
GDataDocumentsDocument.
Trying to upload an ODT as a GDataDocumentText confuses things. We
pass the ODT's MIME type to the GDataUploadStream, which is not the
MIME type of the associated entry. The updated GDataEntry that is
obtained as a side-effect of the upload is set to match the stream's
MIME type. Therefore it is a GDataDocumentDocuments, which isn't the
same type as the initial entry we started with.
https://bugzilla.gnome.org/show_bug.cgi?id=684920
gdata/tests/documents.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdata/tests/documents.c b/gdata/tests/documents.c
index fe787fa..2e14fdf 100644
--- a/gdata/tests/documents.c
+++ b/gdata/tests/documents.c
@@ -938,7 +938,7 @@ static void
set_up_update_document (UpdateDocumentData *data, gconstpointer _test_params)
{
const UpdateDocumentTestParams *test_params = _test_params;
- GDataDocumentsText *document;
+ GDataDocumentsDocument *document;
gchar *title, *document_file_path, *trace_name;
GFile *document_file;
@@ -950,7 +950,7 @@ set_up_update_document (UpdateDocumentData *data, gconstpointer _test_params)
g_free (trace_name);
/* Create a document */
- document = gdata_documents_text_new (NULL);
+ document = gdata_documents_document_new (NULL);
title = g_strdup_printf ("Test Update file (%s)", test_params->test_name);
gdata_entry_set_title (GDATA_ENTRY (document), title);
g_free (title);
@@ -1097,7 +1097,7 @@ test_update (UpdateDocumentData *data, gconstpointer _test_params)
g_object_unref (file_stream);
}
- g_assert (GDATA_IS_DOCUMENTS_TEXT (updated_document));
+ g_assert (GDATA_IS_DOCUMENTS_DOCUMENT (updated_document));
/* Check for success */
switch (test_params->payload_type) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]