MM-2954 - Add a separate post type for /me messages and update formatting (#11082)
* MM-2954 * Added new const post type for /me commands * Modified me command to return response text without *__* wrapper * Modified unit test for MeCommand to reflect changes * Added unit test for the me command provider * * Reverted change to text property in me command response * Added original message in me command response props * Updated unit tests * gofmt changes
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
a760f32526
Коммит
66993e1fae
@@ -350,9 +350,16 @@ func TestMeCommand(t *testing.T) {
|
||||
if len(p1.Order) != 2 {
|
||||
t.Fatal("Command failed to send")
|
||||
} else {
|
||||
if p1.Posts[p1.Order[0]].Message != `*hello*` {
|
||||
t.Log(p1.Posts[p1.Order[0]].Message)
|
||||
t.Fatal("invalid shrug response")
|
||||
pt := p1.Posts[p1.Order[0]].Type
|
||||
if pt != model.POST_ME {
|
||||
t.Log(pt)
|
||||
t.Fatalf("invalid post type, got '%s', wanted '%s'", pt, model.POST_ME)
|
||||
}
|
||||
msg := p1.Posts[p1.Order[0]].Message
|
||||
want := "*hello*"
|
||||
if msg != want {
|
||||
t.Log(msg)
|
||||
t.Fatalf("invalid me response message, got '%s', wanted '%s'", msg, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user