summaryrefslogtreecommitdiffstats
path: root/api/post_test.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-05-17 12:27:03 -0400
committerChristopher Speller <crspeller@gmail.com>2016-05-17 12:27:03 -0400
commit0fe75cb7826944a3352705d5e78eba1d12cc213a (patch)
treee7391d4540f42c9dea23631217b8823db43d632e /api/post_test.go
parent5580c28e54015b78893c33cc3bf41da75712c4cb (diff)
downloadchat-0fe75cb7826944a3352705d5e78eba1d12cc213a.tar.gz
chat-0fe75cb7826944a3352705d5e78eba1d12cc213a.tar.bz2
chat-0fe75cb7826944a3352705d5e78eba1d12cc213a.zip
PLT-1909 Removed the ability to edit system posts (#3013)
* Removed the ability to edit system posts * Added increased timeout to SpinnerButton unit tests
Diffstat (limited to 'api/post_test.go')
-rw-r--r--api/post_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/api/post_test.go b/api/post_test.go
index bb11a5439..b4c23ff06 100644
--- a/api/post_test.go
+++ b/api/post_test.go
@@ -155,6 +155,17 @@ func TestUpdatePost(t *testing.T) {
t.Fatal("failed to updates")
}
}
+
+ post3 := &model.Post{ChannelId: channel1.Id, Message: "a" + model.NewId() + "a", Type: model.POST_JOIN_LEAVE}
+ rpost3, err := Client.CreatePost(post3)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ up3 := &model.Post{Id: rpost3.Data.(*model.Post).Id, ChannelId: channel1.Id, Message: "a" + model.NewId() + " update post 3"}
+ if _, err := Client.UpdatePost(up3); err == nil {
+ t.Fatal("shouldn't have been able to update system message")
+ }
}
func TestGetPosts(t *testing.T) {