mirror of
https://github.com/astaxie/beego.git
synced 2024-12-23 13:40:50 +00:00
22 lines
329 B
Go
22 lines
329 B
Go
package forms
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"./elements"
|
|
)
|
|
|
|
func formTest(t *testing.T) {
|
|
rf := NewForm()
|
|
username := elements.NewText()
|
|
username.SetAttribute("name", "username")
|
|
username.SetAttribute("id", "username")
|
|
rf.AddElement(username)
|
|
|
|
button := elements.NewSubmit()
|
|
rf.AddElement(rf)
|
|
|
|
fmt.Println(rf.Render())
|
|
}
|