Add two test cases for ParseForm

This commit is contained in:
miraclesu 2013-07-25 22:50:29 +08:00
parent b8e06f6365
commit b99a09d73b
1 changed files with 6 additions and 0 deletions

View File

@ -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")
}