[evolution-data-server/openismus-work] test-ecal-create-object: Fixed to assert something that makes sense.



commit 2d3d55a47a2928f27a0fe7c9c42bf4d96bb7c58d
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Wed Jan 23 17:35:07 2013 +0900

    test-ecal-create-object: Fixed to assert something that makes sense.
    
    The old assertions were broken in that it compares the scratch component
    with no UID with the newly created and fetched component.
    
    Now simply check that the newly created component can be fetched and that
    it is 'valid'.

 tests/libecal/test-ecal-create-object.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tests/libecal/test-ecal-create-object.c b/tests/libecal/test-ecal-create-object.c
index 94c2d35..07d8626 100644
--- a/tests/libecal/test-ecal-create-object.c
+++ b/tests/libecal/test-ecal-create-object.c
@@ -21,15 +21,15 @@ test_create_object (ETestServerFixture *fixture,
 
 	cal = E_TEST_SERVER_UTILS_SERVICE (fixture, ECal);
 
-	/* XXX This test is flawed, the component we create has
-	 * no UID, but the created component has one in fact,
-	 * need to adjust the test to expect the right thing.
-	 */
 	component = icalcomponent_new (ICAL_VEVENT_COMPONENT);
 	uid = ecal_test_utils_cal_create_object (cal, component);
 
+	/* Assert that we can fetch the newly created component
+	 * and that it's valid
+	 */
 	component_final = ecal_test_utils_cal_get_object (cal, uid);
-	ecal_test_utils_cal_assert_objects_equal_shallow (component, component_final);
+	g_assert (component_final);
+	g_assert (icalcomponent_is_valid (component_final));
 
 	g_free (uid);
 	icalcomponent_free (component);



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