forked from jooby-project/jooby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIssue1792.java
More file actions
27 lines (23 loc) · 775 Bytes
/
Copy pathIssue1792.java
File metadata and controls
27 lines (23 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package io.jooby.i1792;
import io.jooby.StatusCode;
import io.jooby.junit.ServerTest;
import io.jooby.junit.ServerTestRunner;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class Issue1792 {
@ServerTest
public void scriptMvcRouteShouldProducesSameOutput(ServerTestRunner runner) {
runner.define(app -> {
app.mvc(new Controller1792());
app.post("/s/1792", ctx -> StatusCode.CREATED);
}).ready(client -> {
client.post("/c/1792", rsp -> {
assertEquals("", rsp.body().string());
assertEquals(StatusCode.CREATED_CODE, rsp.code());
});
client.post("/s/1792", rsp -> {
assertEquals("", rsp.body().string());
assertEquals(StatusCode.CREATED_CODE, rsp.code());
});
});
}
}