forked from slack-go/slack
-
Notifications
You must be signed in to change notification settings - Fork 4
/
dialog_text_test.go
29 lines (25 loc) · 760 Bytes
/
dialog_text_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package slack
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestNewTextInput(t *testing.T) {
name := "internalName"
label := "Human Readable"
value := "Pre filled text"
textInput := NewTextInput(name, label, value)
assert.Equal(t, InputTypeText, textInput.Type)
assert.Equal(t, name, textInput.Name)
assert.Equal(t, label, textInput.Label)
assert.Equal(t, value, textInput.Value)
}
func TestNewTextAreaInput(t *testing.T) {
name := "internalName"
label := "Human Readable"
value := "Pre filled text"
textInput := NewTextAreaInput(name, label, value)
assert.Equal(t, InputTypeTextArea, textInput.Type)
assert.Equal(t, name, textInput.Name)
assert.Equal(t, label, textInput.Label)
assert.Equal(t, value, textInput.Value)
}