summaryrefslogtreecommitdiffstats
path: root/api/status_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-12-21 16:35:01 -0500
committerChristopher Speller <crspeller@gmail.com>2016-12-21 16:35:01 -0500
commitba6e370ca71abacaa30234cb164427d27c86df13 (patch)
tree2379b6dab897deef1226f66772b8f05e0bb08f9c /api/status_test.go
parent139cb52c99ac525f44a280803447bbbd88369f23 (diff)
downloadchat-ba6e370ca71abacaa30234cb164427d27c86df13.tar.gz
chat-ba6e370ca71abacaa30234cb164427d27c86df13.tar.bz2
chat-ba6e370ca71abacaa30234cb164427d27c86df13.zip
PLT-5012 Combine updateLastViewedAt, setLastViewedAt and setActiveChannel into a single API (#4840)
* Combine updateLastViewedAt, setLastViewedAt and setActiveChannel into a single API * Remove preference DB writes
Diffstat (limited to 'api/status_test.go')
-rw-r--r--api/status_test.go41
1 files changed, 0 insertions, 41 deletions
diff --git a/api/status_test.go b/api/status_test.go
index 2cf8c624b..5db5a8d7c 100644
--- a/api/status_test.go
+++ b/api/status_test.go
@@ -229,44 +229,3 @@ func TestGetStatusesByIds(t *testing.T) {
t.Fatal("should have errored")
}
}
-
-/*
-func TestSetActiveChannel(t *testing.T) {
- th := Setup().InitBasic()
- Client := th.BasicClient
-
- if _, err := Client.SetActiveChannel(th.BasicChannel.Id); err != nil {
- t.Fatal(err)
- }
-
- status, _ := GetStatus(th.BasicUser.Id)
- if status.ActiveChannel != th.BasicChannel.Id {
- t.Fatal("active channel should be set")
- }
-
- if _, err := Client.SetActiveChannel(""); err != nil {
- t.Fatal(err)
- }
-
- status, _ = GetStatus(th.BasicUser.Id)
- if status.ActiveChannel != "" {
- t.Fatal("active channel should be blank")
- }
-
- if _, err := Client.SetActiveChannel("123456789012345678901234567890"); err == nil {
- t.Fatal("should have failed, id too long")
- }
-
- if _, err := Client.UpdateLastViewedAt(th.BasicChannel.Id, true); err != nil {
- t.Fatal(err)
- }
-
- time.Sleep(500 * time.Millisecond)
-
- status, _ = GetStatus(th.BasicUser.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")
- }
-}
-*/