PLT-7818 Updates to post type (#7579)
* Updates to post type * Update tests
Этот коммит содержится в:
коммит произвёл
Chris
родитель
0da0cf1a21
Коммит
9adaf53e11
@@ -45,3 +45,23 @@ func TestMoveCommand(t *testing.T) {
|
||||
assert.Nil(t, err)
|
||||
assert.EqualValues(t, targetTeam.Id, retrievedCommand.TeamId)
|
||||
}
|
||||
|
||||
func TestCreateCommandPost(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
post := &model.Post{
|
||||
ChannelId: th.BasicChannel.Id,
|
||||
UserId: th.BasicUser.Id,
|
||||
Type: model.POST_SYSTEM_GENERIC,
|
||||
}
|
||||
|
||||
resp := &model.CommandResponse{
|
||||
Text: "some message",
|
||||
}
|
||||
|
||||
_, err := th.App.CreateCommandPost(post, th.BasicTeam.Id, resp)
|
||||
if err == nil && err.Id != "api.context.invalid_param.app_error" {
|
||||
t.Fatal("should have failed - bad post type")
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user