@@ -17,8 +17,7 @@ test('oauthAuthorizationUrl({clientId: "1234567890abcdef1234"})', () => {
17
17
redirectUrl : null ,
18
18
scopes : [ ] ,
19
19
state : "4feornbt361" ,
20
- url :
21
- "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&state=4feornbt361" ,
20
+ url : "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&state=4feornbt361" ,
22
21
} ) ;
23
22
} ) ;
24
23
@@ -35,8 +34,7 @@ test('oauthAuthorizationUrl({clientId: "1234567890abcdef1234", clientType: "oaut
35
34
redirectUrl : null ,
36
35
scopes : [ ] ,
37
36
state : "4feornbt361" ,
38
- url :
39
- "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&state=4feornbt361" ,
37
+ url : "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&state=4feornbt361" ,
40
38
} ) ;
41
39
} ) ;
42
40
@@ -53,8 +51,7 @@ test('oauthAuthorizationUrl({clientId: "lv1.1234567890abcdef", clientType: "gith
53
51
login : null ,
54
52
redirectUrl : null ,
55
53
state : "4feornbt361" ,
56
- url :
57
- "https://github.com/login/oauth/authorize?allow_signup=true&client_id=lv1.1234567890abcdef&state=4feornbt361" ,
54
+ url : "https://github.com/login/oauth/authorize?allow_signup=true&client_id=lv1.1234567890abcdef&state=4feornbt361" ,
58
55
} ) ;
59
56
} ) ;
60
57
@@ -71,27 +68,25 @@ test('oauthAuthorizationUrl({clientId: "4321fedcba0987654321"})', () => {
71
68
redirectUrl : null ,
72
69
scopes : [ ] ,
73
70
state : "4feornbt361" ,
74
- url :
75
- "https://github.com/login/oauth/authorize?allow_signup=true&client_id=4321fedcba0987654321&state=4feornbt361" ,
71
+ url : "https://github.com/login/oauth/authorize?allow_signup=true&client_id=4321fedcba0987654321&state=4feornbt361" ,
76
72
} ) ;
77
73
} ) ;
78
74
79
75
test ( "redirectUrl option" , ( ) => {
80
76
expect (
81
77
oauthAuthorizationUrl ( {
82
78
clientId : "1234567890abcdef1234" ,
83
- redirectUrl : "https://example.com" ,
79
+ redirectUrl : "https://example.com?q=octocat&sort=date " ,
84
80
} )
85
81
) . toEqual ( {
86
82
allowSignup : true ,
87
83
clientId : "1234567890abcdef1234" ,
88
84
clientType : "oauth-app" ,
89
85
login : null ,
90
- redirectUrl : "https://example.com" ,
86
+ redirectUrl : "https://example.com?q=octocat&sort=date " ,
91
87
scopes : [ ] ,
92
88
state : "4feornbt361" ,
93
- url :
94
- "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&redirect_uri=https://example.com&state=4feornbt361" ,
89
+ url : "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&redirect_uri=https%3A%2F%2Fexample.com%3Fq%3Doctocat%26sort%3Ddate&state=4feornbt361" ,
95
90
} ) ;
96
91
} ) ;
97
92
@@ -109,8 +104,7 @@ test("login option", () => {
109
104
redirectUrl : null ,
110
105
scopes : [ ] ,
111
106
state : "4feornbt361" ,
112
- url :
113
- "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&state=4feornbt361" ,
107
+ url : "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&state=4feornbt361" ,
114
108
} ) ;
115
109
} ) ;
116
110
@@ -129,8 +123,7 @@ test("scopes = []", () => {
129
123
redirectUrl : null ,
130
124
scopes : [ ] ,
131
125
state : "4feornbt361" ,
132
- url :
133
- "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&state=4feornbt361" ,
126
+ url : "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&state=4feornbt361" ,
134
127
} ) ;
135
128
} ) ;
136
129
@@ -149,8 +142,7 @@ test('scopes = ""', () => {
149
142
redirectUrl : null ,
150
143
scopes : [ ] ,
151
144
state : "4feornbt361" ,
152
- url :
153
- "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&state=4feornbt361" ,
145
+ url : "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&state=4feornbt361" ,
154
146
} ) ;
155
147
} ) ;
156
148
@@ -169,8 +161,7 @@ test('scopes = "user,public_repo, gist notifications"', () => {
169
161
redirectUrl : null ,
170
162
scopes : [ "user" , "public_repo" , "gist" , "notifications" ] ,
171
163
state : "4feornbt361" ,
172
- url :
173
- "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&scope=user,public_repo,gist,notifications&state=4feornbt361" ,
164
+ url : "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&scope=user%2Cpublic_repo%2Cgist%2Cnotifications&state=4feornbt361" ,
174
165
} ) ;
175
166
} ) ;
176
167
@@ -190,8 +181,7 @@ test("allowSignup = false", () => {
190
181
redirectUrl : null ,
191
182
scopes : [ "user" , "public_repo" , "gist" , "notifications" ] ,
192
183
state : "4feornbt361" ,
193
- url :
194
- "https://github.com/login/oauth/authorize?allow_signup=false&client_id=1234567890abcdef1234&login=octocat&scope=user,public_repo,gist,notifications&state=4feornbt361" ,
184
+ url : "https://github.com/login/oauth/authorize?allow_signup=false&client_id=1234567890abcdef1234&login=octocat&scope=user%2Cpublic_repo%2Cgist%2Cnotifications&state=4feornbt361" ,
195
185
} ) ;
196
186
} ) ;
197
187
@@ -210,8 +200,7 @@ test("state = Sjn2oMwNFZPiVm6Mtjn2o9b3xxZ4sVEI", () => {
210
200
redirectUrl : null ,
211
201
scopes : [ ] ,
212
202
state : "Sjn2oMwNFZPiVm6Mtjn2o9b3xxZ4sVEI" ,
213
- url :
214
- "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&state=Sjn2oMwNFZPiVm6Mtjn2o9b3xxZ4sVEI" ,
203
+ url : "https://github.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&login=octocat&state=Sjn2oMwNFZPiVm6Mtjn2o9b3xxZ4sVEI" ,
215
204
} ) ;
216
205
} ) ;
217
206
@@ -229,7 +218,6 @@ test('oauthAuthorizationUrl({clientId: "1234567890abcdef1234", baseUrl: "https:/
229
218
redirectUrl : null ,
230
219
scopes : [ ] ,
231
220
state : "4feornbt361" ,
232
- url :
233
- "https://github.my-enterprise.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&state=4feornbt361" ,
221
+ url : "https://github.my-enterprise.com/login/oauth/authorize?allow_signup=true&client_id=1234567890abcdef1234&state=4feornbt361" ,
234
222
} ) ;
235
223
} ) ;
0 commit comments