Assert updated with the returned status code instead of URL

Dependencies:   ublox-at-cellular-interface

Files at this revision

API Documentation at this revision

Comitter:
SanaMasood
Date:
Fri Mar 22 12:13:25 2019 +0500
Parent:
19:ee06f3b2b078
Commit message:
Assert updated with the returned status code instead of URL

Changed in this revision

TESTS/unit_tests/http/main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/TESTS/unit_tests/http/main.cpp	Thu Jan 31 18:14:52 2019 +0500
+++ b/TESTS/unit_tests/http/main.cpp	Fri Mar 22 12:13:25 2019 +0500
@@ -143,7 +143,7 @@
                                      NULL, NULL, 0, NULL,
                                      buf, sizeof (buf)) == NULL);
     tr_debug("Received: %s", buf);
-    TEST_ASSERT(strstr(buf, "\"http://httpbin.org/get\"") != NULL);
+    TEST_ASSERT(strstr(buf, "HTTP/1.1 200 OK") != NULL);
 
     // Check HTTP delete request
     memset(buf, 0, sizeof (buf));
@@ -152,7 +152,7 @@
                                      NULL, NULL, 0, NULL,
                                      buf, sizeof (buf)) == NULL);
     tr_debug("Received: %s", buf);
-    TEST_ASSERT(strstr(buf, "\"http://httpbin.org/delete\"") != NULL);
+    TEST_ASSERT(strstr(buf, "HTTP/1.1 200 OK") != NULL);
 
     // Check HTTP put request (this will fail as the echo server doesn't support it)
     memset(buf, 0, sizeof (buf));
@@ -168,7 +168,7 @@
                                      NULL, "formData=0123456789", 0, NULL,
                                      buf, sizeof (buf)) == NULL);
     tr_debug("Received: %s", buf);
-    TEST_ASSERT(strstr(buf, "\"http://httpbin.org/post\"") != NULL);
+    TEST_ASSERT(strstr(buf, "HTTP/1.1 200 OK") != NULL);
 
     // Check HTTP post request with a file, also checking that writing the response
     // to a named file works