proxy: add tests (#44)

This commit is contained in:
Bobby DeSimone 2019-02-12 16:38:17 -08:00 committed by GitHub
parent 4f4f3965aa
commit 09744f6adb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 185 additions and 102 deletions

View file

@ -429,6 +429,12 @@ func TestProxy_Authenticate(t *testing.T) {
authenticator authenticator.Authenticator
wantErr bool
}{
{"cannot save session",
"https://corp.example.com/",
map[string]string{"corp.example.com": "example.com"},
sessions.MockSessionStore{Session: goodSession, SaveError: errors.New("error")},
authenticator.MockAuthenticate{}, true},
{"cannot load session",
"https://corp.example.com/",
map[string]string{"corp.example.com": "example.com"},