Skip to content

Commit

Permalink
fix(RqFake): fix first request line
Browse files Browse the repository at this point in the history
  • Loading branch information
baudoliver7 committed Jan 31, 2022
1 parent 90d4ce7 commit acedcc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/takes/rq/RqFake.java
Expand Up @@ -56,7 +56,7 @@ public RqFake() {
* @param method HTTP method
*/
public RqFake(final CharSequence method) {
this(method, "/");
this(method, "/ HTTP/1.1 ");
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/org/takes/rq/RqFakeTest.java
Expand Up @@ -65,16 +65,16 @@ void conformsToEquality() {
* @throws IOException If some problem inside
*/
@Test
void printsCorrectly() throws IOException {
void printsCorrectly() {
final RqFake req = new RqFake(
"GET",
"/just-a-test",
"/just-a-test HTTP/1.1",
"test-6=alpha"
);
MatcherAssert.assertThat(
new RqPrint(req),
Matchers.allOf(
new TextHasString("GET /just-a-test\r\n"),
new TextHasString("GET /just-a-test HTTP/1.1\r\n"),
new EndsWith("=alpha")
)
);
Expand Down

0 comments on commit acedcc4

Please sign in to comment.