github.com/justinjmoses/evergreen@v0.0.0-20170530173719-1d50e381ff0d/auth/github_test.go (about) 1 package auth 2 3 import ( 4 "testing" 5 6 "github.com/evergreen-ci/evergreen" 7 . "github.com/smartystreets/goconvey/convey" 8 ) 9 10 func TestGithubAuthManager(t *testing.T) { 11 Convey("When creating a UserManager with a GitHub authentication", t, func() { 12 g := evergreen.GithubAuthConfig{ 13 ClientId: "", 14 ClientSecret: "", 15 Users: nil, 16 Organization: "", 17 } 18 Convey("user manager should have functins for Login and LoginCallback handlers", func() { 19 authConfig := evergreen.AuthConfig{nil, nil, &g} 20 userManager, err := LoadUserManager(authConfig) 21 So(err, ShouldBeNil) 22 So(userManager.GetLoginHandler(""), ShouldNotBeNil) 23 So(userManager.GetLoginCallbackHandler(), ShouldNotBeNil) 24 }) 25 }) 26 }