diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2018-09-16 13:43:09 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2018-09-18 23:44:24 -0300 |
commit | 69a9419e3862cbe3b591ca13115b41a378e7fe3a (patch) | |
tree | a291e11b4986fb45600aaaf6ad36954c14507e70 /gdata/tests | |
parent | 13ebb9cee8098506f557f23e872554321ddfe5b7 (diff) | |
download | libgdata-69a9419e3862cbe3b591ca13115b41a378e7fe3a.tar.gz |
tasks: Turn 'position' and 'parent' into writable properties
This will be used by GNOME To Do through Evolution-Data-Server
to manipulate the position of the task in the list.
Additional test checks were added to ensure the propeties behave
as expected.
Diffstat (limited to 'gdata/tests')
-rw-r--r-- | gdata/tests/tasks.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gdata/tests/tasks.c b/gdata/tests/tasks.c index 2e9a03ef..6f3073ad 100644 --- a/gdata/tests/tasks.c +++ b/gdata/tests/tasks.c @@ -256,6 +256,8 @@ test_task_properties (void) gdata_tasks_task_set_due (task, 1409419209); gdata_tasks_task_set_completed (task, 1409419200); /* 9 seconds to spare! */ gdata_tasks_task_set_is_deleted (task, FALSE); + gdata_tasks_task_set_position (task, "0"); + gdata_tasks_task_set_parent (task, NULL); /* Check the properties of the object */ g_object_get (G_OBJECT (task), @@ -278,7 +280,7 @@ test_task_properties (void) g_assert_cmpstr (title, ==, "some-title"); g_assert_cmpint (updated, ==, -1); g_assert_cmpstr (parent, ==, NULL); - g_assert_cmpstr (position, ==, NULL); + g_assert_cmpstr (position, ==, "0"); g_assert_cmpstr (notes, ==, "some-notes"); g_assert_cmpstr (status, ==, GDATA_TASKS_STATUS_NEEDS_ACTION); g_assert_cmpint (due, ==, 1409419209); @@ -302,11 +304,13 @@ test_task_properties (void) "due", (gint64) 1409419200, "completed", (gint64) 1409419200, /* no time to spare! */ "is-deleted", TRUE, + "parent", "parent-uid", + "position", "1", NULL); /* Check the properties using the getters. */ - g_assert_cmpstr (gdata_tasks_task_get_parent (task), ==, NULL); - g_assert_cmpstr (gdata_tasks_task_get_position (task), ==, NULL); + g_assert_cmpstr (gdata_tasks_task_get_parent (task), ==, "parent-uid"); + g_assert_cmpstr (gdata_tasks_task_get_position (task), ==, "1"); g_assert_cmpstr (gdata_tasks_task_get_notes (task), ==, "more-notes"); g_assert_cmpstr (gdata_tasks_task_get_status (task), ==, GDATA_TASKS_STATUS_COMPLETED); @@ -325,6 +329,8 @@ test_task_properties (void) "\"due\": \"2014-08-30T17:20:00Z\"," "\"completed\": \"2014-08-30T17:20:00Z\"," "\"deleted\": true," + "\"position\": \"1\"," + "\"parent\": \"parent-uid\"," "\"hidden\": false" "}"); @@ -340,6 +346,8 @@ test_task_properties (void) "\"due\": \"2014-08-30T17:20:00Z\"," "\"completed\": \"2014-08-30T17:20:00Z\"," "\"deleted\": false," + "\"position\": \"1\"," + "\"parent\": \"parent-uid\"," "\"hidden\": false" "}"); |