From 353761b917a5be34cb519e9ca86d316747c6a9f7 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 22 Sep 2016 16:59:33 -0400 Subject: Fix TestSetActiveChannel unit test (#4071) --- api/status_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'api/status_test.go') diff --git a/api/status_test.go b/api/status_test.go index a8292d323..81edd2103 100644 --- a/api/status_test.go +++ b/api/status_test.go @@ -183,7 +183,8 @@ func TestSetActiveChannel(t *testing.T) { } status, _ = GetStatus(th.BasicUser.Id) - if status.ActiveChannel != th.BasicChannel.Id { + // need to check if offline to catch race + if status.Status != model.STATUS_OFFLINE && status.ActiveChannel != th.BasicChannel.Id { t.Fatal("active channel should be set") } } -- cgit v1.2.3-1-g7c22