summaryrefslogtreecommitdiffstats
path: root/model/post_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/post_test.go')
-rw-r--r--model/post_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/model/post_test.go b/model/post_test.go
index 846c8c775..6a908887d 100644
--- a/model/post_test.go
+++ b/model/post_test.go
@@ -6,6 +6,8 @@ package model
import (
"strings"
"testing"
+
+ "github.com/stretchr/testify/assert"
)
func TestPostJson(t *testing.T) {
@@ -124,6 +126,11 @@ func TestPostIsSystemMessage(t *testing.T) {
}
}
+func TestPostChannelMentions(t *testing.T) {
+ post := Post{Message: "~a ~b ~b ~c/~d."}
+ assert.Equal(t, []string{"a", "b", "c", "d"}, post.ChannelMentions())
+}
+
func TestPostSanitizeProps(t *testing.T) {
post1 := &Post{
Message: "test",