Commit a0d72b3c by Spencer Gibb

removed test with encoded slashes

parent 23cde300
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
package org.springframework.cloud.netflix.zuul; package org.springframework.cloud.netflix.zuul;
import java.io.UnsupportedEncodingException; import static org.junit.Assert.assertEquals;
import java.util.Arrays; import java.util.Arrays;
import org.junit.Test; import org.junit.Test;
...@@ -52,9 +53,6 @@ import com.netflix.loadbalancer.BaseLoadBalancer; ...@@ -52,9 +53,6 @@ import com.netflix.loadbalancer.BaseLoadBalancer;
import com.netflix.loadbalancer.ILoadBalancer; import com.netflix.loadbalancer.ILoadBalancer;
import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.Server;
import com.netflix.zuul.ZuulFilter; import com.netflix.zuul.ZuulFilter;
import org.springframework.web.util.UriUtils;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleZuulProxyApplication.class) @SpringApplicationConfiguration(classes = SampleZuulProxyApplication.class)
...@@ -144,16 +142,6 @@ public class SampleZuulProxyApplicationTests { ...@@ -144,16 +142,6 @@ public class SampleZuulProxyApplicationTests {
assertEquals("Hello space", result.getBody()); assertEquals("Hello space", result.getBody());
} }
@Test
public void postWithEncodedValueWorks() throws UnsupportedEncodingException {
String id = UriUtils.encodePathSegment("id/with/slashes", "UTF-8");
ResponseEntity<String> result = new TestRestTemplate().postForEntity(
"http://localhost:" + this.port + "/simple/local/{id}", "body",
String.class, id);
assertEquals(HttpStatus.OK, result.getStatusCode());
assertEquals("Posted id/with/slashes!", UriUtils.decode(result.getBody(), "UTF-8"));
}
} }
// Don't use @SpringBootApplication because we don't want to component scan // Don't use @SpringBootApplication because we don't want to component scan
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment