diff options
author | George Goldberg <george@gberg.me> | 2017-07-12 14:13:25 +0100 |
---|---|---|
committer | Saturnino Abril <saturnino.abril@gmail.com> | 2017-07-12 22:13:25 +0900 |
commit | 2bf64b54c236945727a2d93afb57b1665d1daa7a (patch) | |
tree | a7b0b3c1114faf5e398b6cb06fd9e61fb818f7b9 /api4/team_test.go | |
parent | e975b84a12b8e3f547f4d811155d076a5a4fdcf9 (diff) | |
download | chat-2bf64b54c236945727a2d93afb57b1665d1daa7a.tar.gz chat-2bf64b54c236945727a2d93afb57b1665d1daa7a.tar.bz2 chat-2bf64b54c236945727a2d93afb57b1665d1daa7a.zip |
PLT-7025: Fix Slack Import API. (#6905)
Diffstat (limited to 'api4/team_test.go')
-rw-r--r-- | api4/team_test.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/api4/team_test.go b/api4/team_test.go index b517f67fe..440b2feb2 100644 --- a/api4/team_test.go +++ b/api4/team_test.go @@ -15,6 +15,7 @@ import ( "github.com/mattermost/platform/app" "github.com/mattermost/platform/model" "github.com/mattermost/platform/utils" + "encoding/base64" ) func TestCreateTeam(t *testing.T) { @@ -1345,7 +1346,12 @@ func TestImportTeam(t *testing.T) { fileResp, resp := th.SystemAdminClient.ImportTeam(data, binary.Size(data), "slack", "Fake_Team_Import.zip", th.BasicTeam.Id) CheckNoError(t, resp) - fileReturned := fmt.Sprintf("%s", fileResp) + fileData, err := base64.StdEncoding.DecodeString(fileResp["results"]) + if err != nil { + t.Fatal("failed to decode base64 results data") + } + + fileReturned := fmt.Sprintf("%s", fileData) if !strings.Contains(fileReturned, "darth.vader@stardeath.com") { t.Log(fileReturned) t.Fatal("failed to report the user was imported") |