[jscover] 53/69: Decode URL path for proxy mode - improve test

Sylvestre Ledru sylvestre at moszumanska.debian.org
Fri Aug 22 05:54:08 UTC 2014


This is an automated email from the git hooks/post-receive script.

sylvestre pushed a commit to branch master
in repository jscover.

commit d478532381e5fa6521c073f7ec30e99f19258675
Author: tntim96 <tntim96 at gmail.com>
Date:   Sat Jul 26 19:34:05 2014 +1000

    Decode URL path for proxy mode - improve test
---
 src/test/java/jscover/server/HttpRequestTest.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/test/java/jscover/server/HttpRequestTest.java b/src/test/java/jscover/server/HttpRequestTest.java
index d20cd6d..4186ec6 100644
--- a/src/test/java/jscover/server/HttpRequestTest.java
+++ b/src/test/java/jscover/server/HttpRequestTest.java
@@ -404,6 +404,11 @@ public class HttpRequestTest {
         assertThat(new HttpRequest("/test%20space.html", null, null, 0, null).getPath(), equalTo("/test space.html"));
     }
 
+     @Test
+    public void shouldHandleSpecialCharsWithFullURL() {
+        assertThat(new HttpRequest("http://localhost/test%20space.html", null, null, 0, null).getPath(), equalTo("/test space.html"));
+    }
+
     @Test
     public void shouldNotSkipInstrumentationIfNoHeaders() {
         HttpRequest httpRequest = new HttpRequest("/test.js", null, null, 0, null);
@@ -431,8 +436,6 @@ public class HttpRequestTest {
         assertThat(new HttpRequest("test.js", null, null, 0, null).getRelativePath(), equalTo("test.js"));
         assertThat(new HttpRequest("/test.js", null, null, 0, null).getRelativePath(), equalTo("test.js"));
         assertThat(new HttpRequest("/js/test.js", null, null, 0, null).getRelativePath(), equalTo("js/test.js"));
-        assertThat(new HttpRequest("/js/a%20b.js", null, null, 0, null).getRelativePath(), equalTo("js/a b.js"));
-        assertThat(new HttpRequest("http://localhost/js/a%20b.js", null, null, 0, null).getRelativePath(), equalTo("js/a b.js"));
     }
 
     @Test

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jscover.git



More information about the pkg-java-commits mailing list