forked from remote/oauth2
Fail during conf init if auth or token URL is not valid.
This commit is contained in:
@@ -36,10 +36,7 @@ func newTestConf() *Config {
|
||||
|
||||
func TestAuthCodeURL(t *testing.T) {
|
||||
conf := newTestConf()
|
||||
url, err := conf.AuthCodeURL("foo")
|
||||
if err != nil {
|
||||
t.Fatalf("Expected to generate an auth URL, failed with %v.", err)
|
||||
}
|
||||
url := conf.AuthCodeURL("foo")
|
||||
if url != "auth-url?access_type=offline&approval_prompt=force&client_id=CLIENT_ID&redirect_uri=REDIRECT_URL&response_type=code&scope=scope1+scope2&state=foo" {
|
||||
t.Fatalf("Generated auth URL is not the expected. Found %v.", url)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user