forked from slack-go/slack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from pylon-labs/bennett/sync-upstream-v13
Bennett/sync upstream v13
- Loading branch information
Showing
52 changed files
with
2,783 additions
and
728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.test | ||
*~ | ||
.idea/ | ||
/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,16 @@ func TestWithStyleForButtonElement(t *testing.T) { | |
|
||
} | ||
|
||
func TestWithURLForButtonElement(t *testing.T) { | ||
|
||
btnTxt := NewTextBlockObject("plain_text", "Next 2 Results", false, false) | ||
btnElement := NewButtonBlockElement("test", "click_me_123", btnTxt) | ||
|
||
btnElement.WithURL("https://foo.bar") | ||
assert.Equal(t, btnElement.URL, "https://foo.bar") | ||
|
||
} | ||
|
||
func TestNewOptionsSelectBlockElement(t *testing.T) { | ||
|
||
testOptionText := NewTextBlockObject("plain_text", "Option One", false, false) | ||
|
@@ -148,6 +158,12 @@ func TestNewPlainTextInputBlockElement(t *testing.T) { | |
|
||
} | ||
|
||
func TestNewRichTextInputBlockElement(t *testing.T) { | ||
richTextInputElement := NewRichTextInputBlockElement(nil, "test") | ||
assert.Equal(t, string(richTextInputElement.Type), "rich_text_input") | ||
assert.Equal(t, richTextInputElement.ActionID, "test") | ||
} | ||
|
||
func TestNewEmailTextInputBlockElement(t *testing.T) { | ||
emailTextInputElement := NewEmailTextInputBlockElement(nil, "[email protected]") | ||
|
||
|
@@ -215,3 +231,19 @@ func TestNewNumberInputBlockElement(t *testing.T) { | |
assert.Equal(t, numberInputElement.IsDecimalAllowed, true) | ||
|
||
} | ||
|
||
func TestNewFileInputBlockElement(t *testing.T) { | ||
|
||
fileInputElement := NewFileInputBlockElement("test") | ||
|
||
assert.Equal(t, string(fileInputElement.Type), "file_input") | ||
assert.Equal(t, fileInputElement.ActionID, "test") | ||
|
||
fileInputElement.WithFileTypes("jpg", "png") | ||
assert.Equal(t, len(fileInputElement.FileTypes), 2) | ||
assert.Contains(t, fileInputElement.FileTypes, "jpg") | ||
assert.Contains(t, fileInputElement.FileTypes, "png") | ||
|
||
fileInputElement.WithMaxFiles(10) | ||
assert.Equal(t, fileInputElement.MaxFiles, 10) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.