[evolution-data-server/openismus-work-3-8] test-client-uid-only-view: Fixed test



commit d65c5b1acc5f2a777f557552901c3a2a976c597d
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Fri Nov 29 21:48:58 2013 +0900

    test-client-uid-only-view: Fixed test
    
    Now we aren't filtering by fields of interest for contact changes,
    so disabled the part of the test which adds a contact.
    
    This can be reverted if we so decide to filter it manually
    in EDataBookView
    
    Conflicts:
    
        tests/libebook/client/test-client-uid-only-view.c

 tests/libebook/client/test-client-uid-only-view.c |   30 +++-----------------
 1 files changed, 5 insertions(+), 25 deletions(-)
---
diff --git a/tests/libebook/client/test-client-uid-only-view.c 
b/tests/libebook/client/test-client-uid-only-view.c
index d080ae2..27bc9e5 100644
--- a/tests/libebook/client/test-client-uid-only-view.c
+++ b/tests/libebook/client/test-client-uid-only-view.c
@@ -35,25 +35,11 @@ static UIDOnlyClosure book_closure_uids_only_async = { { E_TEST_SERVER_ADDRESS_B
 #  define PRINT_TIMER(timer, activity)
 #endif
 
-static gboolean loading_view = FALSE;
 static gboolean uids_only    = FALSE;
 
 /****************************************************************
  *                     Modify/Setup the EBook                   *
  ****************************************************************/
-static void
-add_contact (EBookClient *client)
-{
-       EContact *contact = e_contact_new ();
-
-       e_contact_set (contact, E_CONTACT_FULL_NAME, "Micheal Jackson");
-
-       if (!add_contact_verify (client, contact))
-               g_error ("Failed to add Micheal Jackson");
-
-       g_object_unref (contact);
-}
-
 static gboolean
 setup_book (EBookClient *book_client)
 {
@@ -152,7 +138,6 @@ objects_added (EBookClientView *view,
                gpointer user_data)
 {
        const GSList *l;
-       GMainLoop *loop = (GMainLoop *) user_data;
 
        for (l = contacts; l; l = l->next) {
                EContact *contact = l->data;
@@ -168,10 +153,6 @@ objects_added (EBookClientView *view,
                else if (!uids_only && e_contact_get_const (contact, E_CONTACT_FULL_NAME) == NULL)
                        g_error ("expected contact name missing");
        }
-
-       if (!loading_view)
-               finish_test (view, loop);
-
 }
 
 static void
@@ -187,11 +168,12 @@ objects_removed (EBookClientView *view,
 
 static void
 complete (EBookClientView *view,
-          const GError *error)
+          const GError *error,
+         gpointer user_data)
 {
-       /* Now add a contact and assert that we received notification */
-       loading_view = FALSE;
-       add_contact (e_book_client_view_get_client (view));
+       GMainLoop *loop = (GMainLoop *) user_data;
+
+       finish_test (view, loop);
 }
 
 static void
@@ -215,8 +197,6 @@ setup_and_start_view (EBookClientView *view,
        if (error)
                g_error ("set fields of interest: %s", error->message);
 
-       loading_view = TRUE;
-
        e_book_client_view_start (view, &error);
        if (error)
                g_error ("start view: %s", error->message);


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