style: cargo fmt
Pre-existing whitespace drift in test bodies, normalized by rustfmt. No behavior change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -383,7 +383,10 @@ mod tests {
|
|||||||
// body cap and rejected normal-size photos before they reached
|
// body cap and rejected normal-size photos before they reached
|
||||||
// the backend.
|
// the backend.
|
||||||
assert!(is_transient(&classify_error_response(408, "")));
|
assert!(is_transient(&classify_error_response(408, "")));
|
||||||
assert!(is_transient(&classify_error_response(413, "<html>nginx</html>")));
|
assert!(is_transient(&classify_error_response(
|
||||||
|
413,
|
||||||
|
"<html>nginx</html>"
|
||||||
|
)));
|
||||||
assert!(is_transient(&classify_error_response(429, "{}")));
|
assert!(is_transient(&classify_error_response(429, "{}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
23
src/tags.rs
23
src/tags.rs
@@ -1253,20 +1253,29 @@ mod tests {
|
|||||||
// Seed: two paths tagged, one path untagged.
|
// Seed: two paths tagged, one path untagged.
|
||||||
dao.tagged_photos.borrow_mut().insert(
|
dao.tagged_photos.borrow_mut().insert(
|
||||||
"a.jpg".into(),
|
"a.jpg".into(),
|
||||||
vec![Tag { id: 1, name: "alpha".into(), created_time: 0 }],
|
vec![Tag {
|
||||||
|
id: 1,
|
||||||
|
name: "alpha".into(),
|
||||||
|
created_time: 0,
|
||||||
|
}],
|
||||||
);
|
);
|
||||||
dao.tagged_photos.borrow_mut().insert(
|
dao.tagged_photos.borrow_mut().insert(
|
||||||
"b.jpg".into(),
|
"b.jpg".into(),
|
||||||
vec![
|
vec![
|
||||||
Tag { id: 2, name: "beta".into(), created_time: 0 },
|
Tag {
|
||||||
Tag { id: 3, name: "gamma".into(), created_time: 0 },
|
id: 2,
|
||||||
|
name: "beta".into(),
|
||||||
|
created_time: 0,
|
||||||
|
},
|
||||||
|
Tag {
|
||||||
|
id: 3,
|
||||||
|
name: "gamma".into(),
|
||||||
|
created_time: 0,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
let grouped = dao
|
let grouped = dao
|
||||||
.get_tags_grouped_by_paths(
|
.get_tags_grouped_by_paths(&ctx, &["a.jpg".into(), "b.jpg".into(), "c.jpg".into()])
|
||||||
&ctx,
|
|
||||||
&["a.jpg".into(), "b.jpg".into(), "c.jpg".into()],
|
|
||||||
)
|
|
||||||
.unwrap();
|
.unwrap();
|
||||||
assert_eq!(grouped.get("a.jpg").map(|v| v.len()), Some(1));
|
assert_eq!(grouped.get("a.jpg").map(|v| v.len()), Some(1));
|
||||||
assert_eq!(grouped.get("b.jpg").map(|v| v.len()), Some(2));
|
assert_eq!(grouped.get("b.jpg").map(|v| v.len()), Some(2));
|
||||||
|
|||||||
Reference in New Issue
Block a user