Skip to content

Commit ef181c2

Browse files
committed
Add test
1 parent ec0980a commit ef181c2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/test_user_management.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,26 @@ def test_authorization_url_has_expected_query_params_with_provider(self):
212212
"response_type": RESPONSE_TYPE_CODE,
213213
}
214214

215+
def test_authorization_url_has_expected_query_params_with_prompt(self):
216+
provider = "GoogleOAuth"
217+
redirect_uri = "https://localhost/auth/callback"
218+
prompt = "consent"
219+
authorization_url = self.user_management.get_authorization_url(
220+
provider=provider,
221+
redirect_uri=redirect_uri,
222+
prompt=prompt,
223+
)
224+
225+
parsed_url = urlparse(authorization_url)
226+
assert parsed_url.path == "/user_management/authorize"
227+
assert dict(parse_qsl(str(parsed_url.query))) == {
228+
"client_id": self.http_client.client_id,
229+
"redirect_uri": redirect_uri,
230+
"response_type": RESPONSE_TYPE_CODE,
231+
"provider": provider,
232+
"prompt": prompt,
233+
}
234+
215235
def test_authorization_url_has_expected_query_params_with_domain_hint(self):
216236
connection_id = "connection_123"
217237
redirect_uri = "https://localhost/auth/callback"

0 commit comments

Comments
 (0)