We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 858b6d6 commit d86d274Copy full SHA for d86d274
docs/asciidoc/testing.adoc
@@ -162,8 +162,9 @@ public class TestApp {
162
@Test
163
public void test() {
164
MockRouter router = new MockRouter(new App());
165
- MockContext context = new MockContext()
166
- .setForm(Formdata.create()
+ MockContext context = new MockContext();
+
167
+ context.setForm(Formdata.create(context)
168
.put("name", "Test!")
169
);
170
assertEquals("Test!", router.post("/", context).value());
@@ -180,7 +181,7 @@ class TestApp {
180
181
fun test() {
182
MockRouter router = MockRouter(App())
183
MockContext context = MockContext().apply {
- form = Formdata.create().apply {
184
+ form = Formdata.create(this).apply {
185
put("name", "Test!")
186
}
187
0 commit comments