This commit is contained in:
@@ -305,16 +305,20 @@ async fn reclassify_corrects_already_imported_rows_and_is_idempotent() {
|
||||
// Imported before the taxonomy existed: everything landed as `player`.
|
||||
let ow = owned(&ids);
|
||||
let req = request("g_reclass", "fp-reclass", ow, None);
|
||||
apply_profile_import(&pool, &db, &req).await.expect("import");
|
||||
apply_profile_import(&pool, &db, &req)
|
||||
.await
|
||||
.expect("import");
|
||||
|
||||
let kind_of = |card: String| {
|
||||
let pool = pool.clone();
|
||||
async move {
|
||||
sqlx::query_scalar::<_, String>("SELECT content_kind FROM owned_cards WHERE card_id = ?")
|
||||
.bind(card)
|
||||
.fetch_one(&pool)
|
||||
.await
|
||||
.unwrap()
|
||||
sqlx::query_scalar::<_, String>(
|
||||
"SELECT content_kind FROM owned_cards WHERE card_id = ?",
|
||||
)
|
||||
.bind(card)
|
||||
.fetch_one(&pool)
|
||||
.await
|
||||
.unwrap()
|
||||
}
|
||||
};
|
||||
assert_eq!(kind_of(ids[0].clone()).await, "player");
|
||||
@@ -336,7 +340,9 @@ async fn reclassify_corrects_already_imported_rows_and_is_idempotent() {
|
||||
},
|
||||
],
|
||||
};
|
||||
let out = reclassify_owned_content(&pool, &rc).await.expect("reclassify");
|
||||
let out = reclassify_owned_content(&pool, &rc)
|
||||
.await
|
||||
.expect("reclassify");
|
||||
assert_eq!(out.updated, 2);
|
||||
assert_eq!(out.unchanged, 0);
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user