-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unify absent of HTTP parameter and empty strings fix #407
- Loading branch information
Showing
5 changed files
with
52 additions
and
16 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
coverage-report/src/test/java/org/jooby/issues/Issue407.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.jooby.issues; | ||
|
||
import org.jooby.test.ServerFeature; | ||
import org.junit.Test; | ||
|
||
public class Issue407 extends ServerFeature { | ||
|
||
{ | ||
get("/407", req -> req.param("foo").toOptional()); | ||
} | ||
|
||
@Test | ||
public void shouldIgnoreEmptyValues() throws Exception { | ||
request() | ||
.get("/407") | ||
.expect("Optional.empty"); | ||
|
||
request() | ||
.get("/407?foo=") | ||
.expect("Optional.empty"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters