blob: 334ed2c6d6b42de66fdb07f2aa9bd02e8a15329a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package components_test
import (
"testing"
g "github.com/maragudk/gomponents"
"github.com/maragudk/gomponents/assert"
c "github.com/maragudk/gomponents/components"
)
func TestInputHidden(t *testing.T) {
t.Run("returns an input element with type hidden, and the given name and value", func(t *testing.T) {
n := c.InputHidden("id", "partyhat", g.Attr("class", "hat"))
assert.Equal(t, `<input type="hidden" name="id" value="partyhat" class="hat">`, n)
})
}
|