Skip to content

Commit

Permalink
Validate multipart form value in server test
Browse files Browse the repository at this point in the history
  • Loading branch information
valyala committed Mar 2, 2016
1 parent e4c0cbe commit 0a85495
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ Connection: close
if len(f.File) != 1 {
t.Fatalf("unexpected file values %d. Expecting %d", len(f.File), 1)
}
fv := ctx.FormValue("f1")
if string(fv) != "value1" {
t.Fatalf("unexpected form value: %q. Expecting %q", fv, "value1")
}
ctx.Redirect("/", StatusSeeOther)
default:
ctx.WriteString("non-upload")
Expand Down

0 comments on commit 0a85495

Please sign in to comment.