Update names of collab auth functions to clarify behavior (#32648)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan
2025-06-13 00:35:18 +00:00
committed by GitHub
parent cef0c415f6
commit 1078f929aa
7 changed files with 23 additions and 16 deletions
+13 -6
View File
@@ -72,12 +72,12 @@ async fn test_get_users(db: &Arc<Database>) {
}
test_both_dbs!(
test_get_or_create_user_by_github_account,
test_get_or_create_user_by_github_account_postgres,
test_get_or_create_user_by_github_account_sqlite
test_update_or_create_user_by_github_account,
test_update_or_create_user_by_github_account_postgres,
test_update_or_create_user_by_github_account_sqlite
);
async fn test_get_or_create_user_by_github_account(db: &Arc<Database>) {
async fn test_update_or_create_user_by_github_account(db: &Arc<Database>) {
db.create_user(
"user1@example.com",
None,
@@ -104,7 +104,14 @@ async fn test_get_or_create_user_by_github_account(db: &Arc<Database>) {
.user_id;
let user = db
.get_or_create_user_by_github_account("the-new-login2", 102, None, None, Utc::now(), None)
.update_or_create_user_by_github_account(
"the-new-login2",
102,
None,
None,
Utc::now(),
None,
)
.await
.unwrap();
assert_eq!(user.id, user_id2);
@@ -112,7 +119,7 @@ async fn test_get_or_create_user_by_github_account(db: &Arc<Database>) {
assert_eq!(user.github_user_id, 102);
let user = db
.get_or_create_user_by_github_account(
.update_or_create_user_by_github_account(
"login3",
103,
Some("user3@example.com"),