oauth2_proxy/pkg/apis/options/options_test.go

38 lines
644 B
Go
Raw Normal View History

2019-06-08 20:20:18 +00:00
package options
import (
"io"
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
func TestOptions(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Options")
}
var _ = Describe("Load", func() {
var opts *Options
var err error
var config io.Reader
var configType string
var args []string
JustBeforeEach(func() {
opts, err = Load(config, configType, args)
})
Context("with no configuration", func() {
It("returns no error", func() {
Expect(err).NotTo(HaveOccurred())
})
It("returns the default configuration", func() {
defaultOpts := New()
Expect(opts).To(Equal(defaultOpts))
})
})
})