From 97558f6a6ec4c53fa69035fb430ead209d9c222d Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 13 Jan 2017 13:53:37 -0500 Subject: PLT-4938 Add app package and move logic over from api package (#4931) * Add app package and move logic over from api package * Change app package functions to return errors * Move non-api tests into app package * Fix merge --- api/context_test.go | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'api/context_test.go') diff --git a/api/context_test.go b/api/context_test.go index 2227b7f65..cd6ca01aa 100644 --- a/api/context_test.go +++ b/api/context_test.go @@ -4,32 +4,9 @@ package api import ( - "github.com/mattermost/platform/model" "testing" ) -func TestCache(t *testing.T) { - session := &model.Session{ - Id: model.NewId(), - Token: model.NewId(), - UserId: model.NewId(), - } - - sessionCache.AddWithExpiresInSecs(session.Token, session, 5*60) - - keys := sessionCache.Keys() - if len(keys) <= 0 { - t.Fatal("should have items") - } - - RemoveAllSessionsForUserId(session.UserId) - - rkeys := sessionCache.Keys() - if len(rkeys) != len(keys)-1 { - t.Fatal("should have one less") - } -} - func TestSiteURL(t *testing.T) { c := &Context{} -- cgit v1.2.3-1-g7c22