fix: remove stray space in upload filename format string
This commit is contained in:
parent
44c1358da5
commit
281da208f5
@ -189,4 +189,16 @@ pub async fn upload_image(
|
|||||||
})))
|
})))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
#[test]
|
||||||
|
fn filename_format_no_spaces() {
|
||||||
|
let now_str = "120000";
|
||||||
|
let uuid = "abc-123";
|
||||||
|
let ext = "jpg";
|
||||||
|
let file_name = format!("{}.{}.{}", now_str, uuid, ext);
|
||||||
|
assert!(!file_name.contains(' '), "filename should not contain spaces: got '{}'", file_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user