Commit b99a09d7 authored by miraclesu's avatar miraclesu

Add two test cases for ParseForm

parent b8e06f63
......@@ -27,6 +27,12 @@ func TestParseForm(t *testing.T) {
if err := ParseForm(form, &u); err != nil {
t.Fatal(err)
}
if u.Id != 0 {
t.Error("Id should not be changed")
}
if len(u.tag) != 0 {
t.Error("tag should not be changed")
}
if u.Name.(string) != "test" {
t.Error("should be equal")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment