File: glob.go

package info (click to toggle)
golang-github-zitadel-oidc 3.44.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,520 kB
  • sloc: makefile: 5
file content (24 lines) | stat: -rw-r--r-- 784 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package mock

import (
	"testing"

	gomock "github.com/golang/mock/gomock"
	"github.com/zitadel/oidc/v3/pkg/oidc"
	op "github.com/zitadel/oidc/v3/pkg/op"
)

func NewHasRedirectGlobs(t *testing.T) op.HasRedirectGlobs {
	return NewMockHasRedirectGlobs(gomock.NewController(t))
}

func NewHasRedirectGlobsWithConfig(t *testing.T, uri []string, appType op.ApplicationType, responseTypes []oidc.ResponseType, devMode bool) op.HasRedirectGlobs {
	c := NewHasRedirectGlobs(t)
	m := c.(*MockHasRedirectGlobs)
	m.EXPECT().RedirectURIs().AnyTimes().Return(uri)
	m.EXPECT().RedirectURIGlobs().AnyTimes().Return(uri)
	m.EXPECT().ApplicationType().AnyTimes().Return(appType)
	m.EXPECT().ResponseTypes().AnyTimes().Return(responseTypes)
	m.EXPECT().DevMode().AnyTimes().Return(devMode)
	return c
}