ability to use session cookie in login #47

This commit is contained in:
Umputun
2018-06-02 13:39:14 -05:00
parent c77a98542a
commit 7ae4a09f6b
7 changed files with 94 additions and 26 deletions
+2 -1
View File
@@ -42,7 +42,7 @@ func TestLoadingCache_Get(t *testing.T) {
time.Sleep(100 * time.Millisecond) // let postFn to do its thing
assert.Equal(t, int32(1), atomic.LoadInt32(&postFnCall))
res, err = lc.Get("key", func() ([]byte, error) {
_, err = lc.Get("key", func() ([]byte, error) {
return nil, errors.New("err")
})
assert.NotNil(t, err)
@@ -199,6 +199,7 @@ func TestLoadingCache_Scopes(t *testing.T) {
res, err = lc.Get(Key("key", "s1", "s2"), func() ([]byte, error) {
return []byte("value-upd"), nil
})
assert.Nil(t, err)
assert.Equal(t, "value-upd", string(res), "was deleted, update")
}