mirror of
https://github.com/astaxie/beego.git
synced 2024-11-29 21:51:29 +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())
|
||
|
}
|