diff options
author | Jesse Hallam <jesse.hallam@gmail.com> | 2018-01-03 10:35:36 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2018-01-03 10:35:36 -0500 |
commit | e5dad3cf681fb038ce5dd3dcf7b5468d59b8ea8e (patch) | |
tree | d3040d03a076b5e3b0d991bcb5d4d703f9a45c07 /api4/webhook_test.go | |
parent | 15cc4497588537f3f9b81d6f97228fae946fa008 (diff) | |
download | chat-e5dad3cf681fb038ce5dd3dcf7b5468d59b8ea8e.tar.gz chat-e5dad3cf681fb038ce5dd3dcf7b5468d59b8ea8e.tar.bz2 chat-e5dad3cf681fb038ce5dd3dcf7b5468d59b8ea8e.zip |
[PLT-8173] Strip the post_ prefix on incoming webhook overrides. (#8019)
Diffstat (limited to 'api4/webhook_test.go')
-rw-r--r-- | api4/webhook_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/api4/webhook_test.go b/api4/webhook_test.go index 464245259..724fd0ea4 100644 --- a/api4/webhook_test.go +++ b/api4/webhook_test.go @@ -425,8 +425,8 @@ func TestUpdateIncomingHook(t *testing.T) { createdHook.DisplayName = "hook2" createdHook.Description = "description" createdHook.ChannelId = th.BasicChannel2.Id - createdHook.PostUsername = "username" - createdHook.PostIconURL = "icon" + createdHook.Username = "username" + createdHook.IconURL = "icon" updatedHook, resp := th.SystemAdminClient.UpdateIncomingWebhook(createdHook) CheckNoError(t, resp) @@ -443,11 +443,11 @@ func TestUpdateIncomingHook(t *testing.T) { t.Fatal("Hook channel is not updated") } - if updatedHook.PostUsername != "" { + if updatedHook.Username != "" { t.Fatal("Hook username was incorrectly updated") } - if updatedHook.PostIconURL != "" { + if updatedHook.IconURL != "" { t.Fatal("Hook icon was incorrectly updated") } } else { @@ -465,8 +465,8 @@ func TestUpdateIncomingHook(t *testing.T) { createdHook.DisplayName = "hook2" createdHook.Description = "description" createdHook.ChannelId = th.BasicChannel2.Id - createdHook.PostUsername = "username" - createdHook.PostIconURL = "icon" + createdHook.Username = "username" + createdHook.IconURL = "icon" updatedHook, resp := th.SystemAdminClient.UpdateIncomingWebhook(createdHook) CheckNoError(t, resp) @@ -483,11 +483,11 @@ func TestUpdateIncomingHook(t *testing.T) { t.Fatal("Hook channel is not updated") } - if updatedHook.PostUsername != "username" { + if updatedHook.Username != "username" { t.Fatal("Hook username is not updated") } - if updatedHook.PostIconURL != "icon" { + if updatedHook.IconURL != "icon" { t.Fatal("Hook icon is not updated") } } else { |