mirror of
https://github.com/wahyd4/loginsrv.git
synced 2026-08-09 04:46:29 +10:00
test coverage
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package oauth2
|
||||
|
||||
import ()
|
||||
|
||||
// Oauth provider configuration
|
||||
type Provider interface {
|
||||
// The oauth authentication url to redirect to
|
||||
AuthURL() string
|
||||
|
||||
// The url for token exchange
|
||||
TokenURL() string
|
||||
}
|
||||
type Manager struct {
|
||||
configs map[string]map[string]string
|
||||
}
|
||||
|
||||
func NewManager() *Manager {
|
||||
return &Manager{
|
||||
configs: map[string]map[string]string{},
|
||||
}
|
||||
}
|
||||
|
||||
func (oauth *Manager) AddConfig(opts map[string]string) error {
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package oauth2
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_Manager(t *testing.T) {
|
||||
m := NewManager()
|
||||
m.AddConfig(nil)
|
||||
assert.Equal(t, true, true)
|
||||
}
|
||||
Reference in New Issue
Block a user