test coverage

This commit is contained in:
Sebastian Mancke
2017-04-15 21:06:48 +02:00
parent f64e996c95
commit a5b8aee31b
2 changed files with 37 additions and 0 deletions
+25
View File
@@ -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
}
+12
View File
@@ -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)
}