emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master ae2587e 5/8: Extend simple POST test to check content-type


From: Stefan Monnier
Subject: [elpa] master ae2587e 5/8: Extend simple POST test to check content-type and body
Date: Mon, 30 Mar 2020 09:06:29 -0400 (EDT)

branch: master
commit ae2587ebc6f3cfe56fa2a3682f4d98ddff41ab0c
Author: jcaw <address@hidden>
Commit: jcaw <address@hidden>

    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

[Prev in Thread] Current Thread [Next in Thread]