branch: master
commit ae2587ebc6f3cfe56fa2a3682f4d98ddff41ab0c
Author: jcaw <[email protected]>
Commit: jcaw <[email protected]>

    Extend simple POST test to check content-type and body
    
    Want to ensure we can access both of these, even in a request type that
    `web-server` already natively handles.
---
 web-server-test.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/web-server-test.el b/web-server-test.el
index 78c6efc..01e08f8 100644
--- a/web-server-test.el
+++ b/web-server-test.el
@@ -177,7 +177,11 @@ 
org=-+one%0A-+two%0A-+three%0A-+four%0A%0A&beg=646&end=667&path=%2Fcomplex.org")
 - three
 - four
 
-"))))
+"))
+            (should (string= (cdr (assoc :CONTENT-TYPE headers))
+                             "application/x-www-form-urlencoded; 
charset=UTF-8"))
+            (should (string= (oref request body)
+                             
"org=-+one%0A-+two%0A-+three%0A-+four%0A%0A&beg=646&end=667&path=%2Fcomplex.org"))))
       (ws-stop server))))
 
 (ert-deftest ws/simple-post ()

Reply via email to