summaryrefslogtreecommitdiffstats
path: root/api/channel_test.go
diff options
context:
space:
mode:
authorAlexander Smaga <smagaan@gmail.com>2016-10-13 18:13:12 +0300
committerJoram Wilander <jwawilander@gmail.com>2016-10-13 11:13:12 -0400
commit69e90255aa594b54667b9caf18fa3b5e33e13649 (patch)
tree7d4651607f9291c0d48ef634f1d7cce4209634d2 /api/channel_test.go
parent8c8bc7111c87825581661bfd567c3acb8b58ef80 (diff)
downloadchat-69e90255aa594b54667b9caf18fa3b5e33e13649.tar.gz
chat-69e90255aa594b54667b9caf18fa3b5e33e13649.tar.bz2
chat-69e90255aa594b54667b9caf18fa3b5e33e13649.zip
GH-4087 added extra fields to Props in header update system message (#4209)
Diffstat (limited to 'api/channel_test.go')
-rw-r--r--api/channel_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/api/channel_test.go b/api/channel_test.go
index a3f3e211c..1d0f0270d 100644
--- a/api/channel_test.go
+++ b/api/channel_test.go
@@ -379,6 +379,15 @@ func TestUpdateChannelHeader(t *testing.T) {
upChannel1 = result.Data.(*model.Channel)
}
+ r1 := Client.Must(Client.GetPosts(channel1.Id, 0, 1, "")).Data.(*model.PostList)
+ if len(r1.Order) != 1 {
+ t.Fatal("Header update system message was not found")
+ } else if val, ok := r1.Posts[r1.Order[0]].Props["old_header"]; !ok || val != "" {
+ t.Fatal("Props should contain old_header with old header value")
+ } else if val, ok := r1.Posts[r1.Order[0]].Props["new_header"]; !ok || val != "new header" {
+ t.Fatal("Props should contain new_header with new header value")
+ }
+
if upChannel1.Header != data["channel_header"] {
t.Fatal("Failed to update header")
}