From e5dad3cf681fb038ce5dd3dcf7b5468d59b8ea8e Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Wed, 3 Jan 2018 10:35:36 -0500 Subject: [PLT-8173] Strip the post_ prefix on incoming webhook overrides. (#8019) --- api4/webhook_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'api4') 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 { -- cgit v1.2.3-1-g7c22