diff options
Diffstat (limited to 'api4')
-rw-r--r-- | api4/channel_test.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/api4/channel_test.go b/api4/channel_test.go index 1747d79b9..e4da4f4d2 100644 --- a/api4/channel_test.go +++ b/api4/channel_test.go @@ -502,9 +502,7 @@ func TestGetDeletedChannelsForTeam(t *testing.T) { channels, resp = Client.GetDeletedChannelsForTeam(team.Id, 0, 100, "") CheckNoError(t, resp) - if len(channels) != 0 { - t.Fatal("should be no deleted channels") - } + numInitialChannelsForTeam := len(channels) // create and delete public channel publicChannel1 := th.CreatePublicChannel() @@ -512,7 +510,7 @@ func TestGetDeletedChannelsForTeam(t *testing.T) { channels, resp = Client.GetDeletedChannelsForTeam(team.Id, 0, 100, "") CheckNoError(t, resp) - if len(channels) != 1 { + if len(channels) != numInitialChannelsForTeam+1 { t.Fatal("should be 1 deleted channel") } @@ -521,7 +519,7 @@ func TestGetDeletedChannelsForTeam(t *testing.T) { channels, resp = Client.GetDeletedChannelsForTeam(team.Id, 0, 100, "") CheckNoError(t, resp) - if len(channels) != 2 { + if len(channels) != numInitialChannelsForTeam+2 { t.Fatal("should be 2 deleted channels") } |