[geocode-glib] tests: Check the status of the request in the JSON output



commit d102c7c1316c194c02bb17113972eef8f72782b8
Author: Satabdi Das <satabdidas gmail com>
Date:   Tue Jan 29 16:12:40 2013 +0530

    tests: Check the status of the request in the JSON output
    
    By adding an assert on error.

 geocode-glib/test-geoip.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/geocode-glib/test-geoip.c b/geocode-glib/test-geoip.c
index b5af960..b119ee1 100644
--- a/geocode-glib/test-geoip.c
+++ b/geocode-glib/test-geoip.c
@@ -3,6 +3,7 @@
 #include <locale.h>
 #include <glib.h>
 #include <stdlib.h>
+#include <string.h>
 #include <gio/gio.h>
 #include <geocode-ipclient.h>
 
@@ -28,7 +29,7 @@ test_search (gconstpointer data)
                 g_error_free (error);
         }
         g_assert (contents != NULL);
-
+        g_assert (strstr (contents, "\"ERROR\"") == NULL);
         g_object_unref (ipclient);
         g_print ("%s\n", contents);
         g_free (contents);


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