File: block_input_test.go

package info (click to toggle)
golang-github-slack-go-slack 0.11.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 1,720 kB
  • sloc: makefile: 54
file content (18 lines) | stat: -rw-r--r-- 542 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package slack

import (
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestNewInputBlock(t *testing.T) {
	label := NewTextBlockObject("plain_text", "label", false, false)
	element := NewDatePickerBlockElement("action_id")
	hint := NewTextBlockObject("plain_text", "hint", false, false)
	inputBlock := NewInputBlock("test", label, hint, element)
	assert.Equal(t, string(inputBlock.Type), "input")
	assert.Equal(t, inputBlock.BlockID, "test")
	assert.Equal(t, inputBlock.Label, label)
	assert.Equal(t, inputBlock.Element, element)
}