feat: dev mode on client, check client configuration (#41)
* fix: tests * fix: tests * fix: tests
This commit is contained in:
parent
3507057c66
commit
c6e22dff69
10 changed files with 215 additions and 71 deletions
|
@ -1,6 +1,7 @@
|
|||
package mock
|
||||
|
||||
import (
|
||||
"github.com/caos/oidc/pkg/oidc"
|
||||
"testing"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
|
@ -27,3 +28,13 @@ func NewClientExpectAny(t *testing.T, appType op.ApplicationType) op.Client {
|
|||
})
|
||||
return c
|
||||
}
|
||||
|
||||
func NewClientWithConfig(t *testing.T, uri []string, appType op.ApplicationType, responseTypes []oidc.ResponseType, devMode bool) op.Client {
|
||||
c := NewClient(t)
|
||||
m := c.(*MockClient)
|
||||
m.EXPECT().RedirectURIs().AnyTimes().Return(uri)
|
||||
m.EXPECT().ApplicationType().AnyTimes().Return(appType)
|
||||
m.EXPECT().ResponseTypes().AnyTimes().Return(responseTypes)
|
||||
m.EXPECT().DevMode().AnyTimes().Return(devMode)
|
||||
return c
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue