From 0960142f05217fba9cac6bc789aef261747ecae7 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Wed, 12 Aug 2015 00:02:47 -0700 Subject: [PATCH] fixed token unit test --- pkg/server/token_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/server/token_test.go b/pkg/server/token_test.go index 9fb7c5372..96f4cf377 100644 --- a/pkg/server/token_test.go +++ b/pkg/server/token_test.go @@ -63,7 +63,7 @@ func TestToken(t *testing.T) { conf := &config.Config{} conf.Session.Secret = "Otto" ctx.Set("settings", conf) - ctx.Set("session", session.New(conf)) + ctx.Set("session", session.New(conf.Session.Secret)) // prepare the mock store.On("AddToken", mock.AnythingOfType("*types.Token")).Return(test.storeErr).Once() @@ -102,7 +102,7 @@ func TestToken(t *testing.T) { conf := &config.Config{} conf.Session.Secret = "Otto" ctx.Set("settings", conf) - ctx.Set("session", session.New(conf)) + ctx.Set("session", session.New(conf.Session.Secret)) // prepare the mock store.On("TokenLabel", mock.AnythingOfType("*types.User"), test.inLabel).Return(test.outToken, test.errTokenLabel).Once()