Skip to content

Commit

Permalink
test: Viewtype::File attachments are sent unchanged and preserve exte…
Browse files Browse the repository at this point in the history
…nsions
  • Loading branch information
iequidoo committed May 23, 2024
1 parent 8c3c048 commit af4b59f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,11 @@ mod tests {
.get_blobdir()
.join("saved-".to_string() + &bob_msg.get_filename().unwrap());
bob_msg.save_file(&bob, &file_saved).await?;
if viewtype == Viewtype::File {
assert_eq!(file_saved.extension().unwrap(), extension);
let bytes1 = fs::read(&file_saved).await?;
assert_eq!(&bytes1, bytes);
}

let blob = BlobObject::new_from_path(&bob, &file_saved).await?;
let (_, exif) = blob.metadata()?;
Expand Down

0 comments on commit af4b59f

Please sign in to comment.