b99a09d7 by miraclesu

Add two test cases for ParseForm

1 parent b8e06f63
...@@ -27,6 +27,12 @@ func TestParseForm(t *testing.T) { ...@@ -27,6 +27,12 @@ func TestParseForm(t *testing.T) {
27 if err := ParseForm(form, &u); err != nil { 27 if err := ParseForm(form, &u); err != nil {
28 t.Fatal(err) 28 t.Fatal(err)
29 } 29 }
30 if u.Id != 0 {
31 t.Error("Id should not be changed")
32 }
33 if len(u.tag) != 0 {
34 t.Error("tag should not be changed")
35 }
30 if u.Name.(string) != "test" { 36 if u.Name.(string) != "test" {
31 t.Error("should be equal") 37 t.Error("should be equal")
32 } 38 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!