diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-07-14 17:06:59 -0400 |
---|---|---|
committer | Saturnino Abril <saturnino.abril@gmail.com> | 2017-07-15 05:06:59 +0800 |
commit | 9a23519d07664f252fe5a568034abf6b720511d0 (patch) | |
tree | d286c2b219d57c9c98421cf965d7271a288ba16b /api4/team_test.go | |
parent | a20ddb40476837f8686d9f73b449920f4e465d4a (diff) | |
download | chat-9a23519d07664f252fe5a568034abf6b720511d0.tar.gz chat-9a23519d07664f252fe5a568034abf6b720511d0.tar.bz2 chat-9a23519d07664f252fe5a568034abf6b720511d0.zip |
PLT-6983 Allowed team invite IDs of arbitrary lengths to match API v3 (#6944)
Diffstat (limited to 'api4/team_test.go')
-rw-r--r-- | api4/team_test.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/api4/team_test.go b/api4/team_test.go index 440b2feb2..421428afa 100644 --- a/api4/team_test.go +++ b/api4/team_test.go @@ -12,10 +12,10 @@ import ( "strings" "testing" + "encoding/base64" "github.com/mattermost/platform/app" "github.com/mattermost/platform/model" "github.com/mattermost/platform/utils" - "encoding/base64" ) func TestCreateTeam(t *testing.T) { @@ -1475,7 +1475,7 @@ func TestInviteUsersToTeam(t *testing.T) { } func TestGetTeamInviteInfo(t *testing.T) { - th := Setup().InitBasic() + th := Setup().InitBasic().InitSystemAdmin() defer TearDown() Client := th.Client team := th.BasicTeam @@ -1491,6 +1491,13 @@ func TestGetTeamInviteInfo(t *testing.T) { t.Fatal("should be empty") } + team.InviteId = "12345678901234567890123456789012" + team, resp = th.SystemAdminClient.UpdateTeam(team) + CheckNoError(t, resp) + + team, resp = Client.GetTeamInviteInfo(team.InviteId) + CheckNoError(t, resp) + _, resp = Client.GetTeamInviteInfo("junk") - CheckBadRequestStatus(t, resp) + CheckNotFoundStatus(t, resp) } |