@@ -28,7 +28,7 @@ func testGitLabProvider(hostname string) *GitLabProvider {
28
28
}
29
29
30
30
func testGitLabBackend (payload string ) * httptest.Server {
31
- path := "/api/v3 /user"
31
+ path := "/api/v4 /user"
32
32
query := "access_token=imaginary_access_token"
33
33
34
34
return httptest .NewServer (http .HandlerFunc (
@@ -51,7 +51,7 @@ func TestGitLabProviderDefaults(t *testing.T) {
51
51
p .Data ().LoginURL .String ())
52
52
assert .Equal (t , "https://gitlab.com/oauth/token" ,
53
53
p .Data ().RedeemURL .String ())
54
- assert .Equal (t , "https://gitlab.com/api/v3 /user" ,
54
+ assert .Equal (t , "https://gitlab.com/api/v4 /user" ,
55
55
p .Data ().ValidateURL .String ())
56
56
assert .Equal (t , "read_user" , p .Data ().Scope )
57
57
}
@@ -70,15 +70,15 @@ func TestGitLabProviderOverrides(t *testing.T) {
70
70
ValidateURL : & url.URL {
71
71
Scheme : "https" ,
72
72
Host : "example.com" ,
73
- Path : "/api/v3 /user" },
73
+ Path : "/api/v4 /user" },
74
74
Scope : "profile" })
75
75
assert .NotEqual (t , nil , p )
76
76
assert .Equal (t , "GitLab" , p .Data ().ProviderName )
77
77
assert .Equal (t , "https://example.com/oauth/auth" ,
78
78
p .Data ().LoginURL .String ())
79
79
assert .Equal (t , "https://example.com/oauth/token" ,
80
80
p .Data ().RedeemURL .String ())
81
- assert .Equal (t , "https://example.com/api/v3 /user" ,
81
+ assert .Equal (t , "https://example.com/api/v4 /user" ,
82
82
p .Data ().ValidateURL .String ())
83
83
assert .Equal (t , "profile" , p .Data ().Scope )
84
84
}
0 commit comments