Skip to content

Commit d86d274

Browse files
committed
documentation: create(io.jooby.Context)' in 'io.jooby.Formdata' cannot be applied to '()' fix #2045
1 parent 858b6d6 commit d86d274

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/asciidoc/testing.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,9 @@ public class TestApp {
162162
@Test
163163
public void test() {
164164
MockRouter router = new MockRouter(new App());
165-
MockContext context = new MockContext()
166-
.setForm(Formdata.create()
165+
MockContext context = new MockContext();
166+
167+
context.setForm(Formdata.create(context)
167168
.put("name", "Test!")
168169
);
169170
assertEquals("Test!", router.post("/", context).value());
@@ -180,7 +181,7 @@ class TestApp {
180181
fun test() {
181182
MockRouter router = MockRouter(App())
182183
MockContext context = MockContext().apply {
183-
form = Formdata.create().apply {
184+
form = Formdata.create(this).apply {
184185
put("name", "Test!")
185186
}
186187
}

0 commit comments

Comments
 (0)