[libgdata/wip/rishi/drive: 10/10] tests: Drive v2 uses JSON, not XML
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata/wip/rishi/drive: 10/10] tests: Drive v2 uses JSON, not XML
- Date: Tue, 19 Sep 2017 17:57:54 +0000 (UTC)
commit ce8d0e2e6d4a276c9101006f64d763c136f9efb5
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Sep 19 19:54:13 2017 +0200
tests: Drive v2 uses JSON, not XML
https://bugzilla.gnome.org/show_bug.cgi?id=684920
gdata/tests/documents.c | 39 +++++++--------------------------------
1 files changed, 7 insertions(+), 32 deletions(-)
---
diff --git a/gdata/tests/documents.c b/gdata/tests/documents.c
index d566b4c..bb5fbb1 100644
--- a/gdata/tests/documents.c
+++ b/gdata/tests/documents.c
@@ -1662,38 +1662,13 @@ test_folder_parser_normal (void)
GDataAuthor *author;
GError *error = NULL;
- folder = GDATA_DOCUMENTS_FOLDER (gdata_parsable_new_from_xml (GDATA_TYPE_DOCUMENTS_FOLDER,
- "<?xml version='1.0' encoding='UTF-8'?>"
- "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:docs='http://schemas.google.com/docs/2007' "
- "xmlns:batch='http://schemas.google.com/gdata/batch'
xmlns:gd='http://schemas.google.com/g/2005' "
- "gd:etag='"WBYEFh8LRCt7ImBk"'>"
- "<id>https://docs.google.com/feeds/id/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams</id>"
- "<published>2012-04-14T09:12:19.418Z</published>"
- "<updated>2012-04-14T09:12:19.418Z</updated>"
- "<app:edited
xmlns:app='http://www.w3.org/2007/app'>2012-04-14T09:12:20.055Z</app:edited>"
- "<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/docs/2007#folder' label='folder'/>"
- "<title>Temporary Folder</title>"
- "<content type='application/atom+xml;type=feed' "
-
"src='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams/contents'/>"
- "<link rel='alternate' type='text/html'
href='https://docs.google.com/#folders/folder.0.0BzY2jgHHwMwYalFhbjhVT3dyams'/>"
- "<link rel='http://schemas.google.com/docs/2007#icon' type='image/png'
href='https://ssl.gstatic.com/docs/doclist/images/icon_9_collection_list.png'/>"
- "<link rel='http://schemas.google.com/g/2005#resumable-create-media'
type='application/atom+xml'
href='https://docs.google.com/feeds/upload/create-session/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams/contents'/>"
- "<link rel='http://schemas.google.com/docs/2007#alt-post' type='application/atom+xml'
href='https://docs.google.com/feeds/upload/file/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams/contents'/>"
- "<link rel='self' type='application/atom+xml'
href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams'/>"
- "<link rel='edit' type='application/atom+xml'
href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams'/>"
- "<author>"
- "<name>libgdata.documents</name>"
- "<email>libgdata documents gmail com</email>"
- "</author>"
- "<gd:resourceId>folder:0BzY2jgHHwMwYalFhbjhVT3dyams</gd:resourceId>"
- "<gd:lastModifiedBy>"
- "<name>libgdata.documents</name>"
- "<email>libgdata documents gmail com</email>"
- "</gd:lastModifiedBy>"
- "<gd:quotaBytesUsed>0</gd:quotaBytesUsed>"
- "<docs:writersCanInvite value='false'/>"
- "<gd:feedLink rel='http://schemas.google.com/acl/2007#accessControlList'
href='https://docs.google.com/feeds/default/private/full/folder%3A0BzY2jgHHwMwYalFhbjhVT3dyams/acl'/>"
- "</entry>", -1, &error));
+ folder = GDATA_DOCUMENTS_FOLDER (gdata_parsable_new_from_json (GDATA_TYPE_DOCUMENTS_FOLDER,
+ "{"
+ "\"kind\": \"drive#file\","
+ "\"id\": \"0ANJ_DkaiBDRFUk9PVA\","
+ "\"selfLink\": \"https://www.googleapis.com/drive/v2/files/0ANJ_DkaiBDRFUk9PVA\","
+ "\"mimeType\": \"application/vnd.google-apps.folder\","
+ "}", -1, &error));
g_assert_no_error (error);
g_assert (GDATA_IS_DOCUMENTS_FOLDER (folder));
gdata_test_compare_kind (GDATA_ENTRY (folder), "http://schemas.google.com/docs/2007#folder", NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]