From e725903eb973b5eb125f0fb7ce0cfa4c48080a4a Mon Sep 17 00:00:00 2001 From: Cyborus Date: Fri, 15 Dec 2023 12:00:29 -0500 Subject: [PATCH] add download test --- tests/ci_test.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/ci_test.rs b/tests/ci_test.rs index 39acbd4..5812074 100644 --- a/tests/ci_test.rs +++ b/tests/ci_test.rs @@ -220,6 +220,14 @@ async fn repo(api: &forgejo_api::Forgejo) -> eyre::Result<()> { ) .await .wrap_err("failed to create release attachment")?; + ensure!( + api.download_release_attachment("TestingAdmin", "test", release.id, attachment.id) + .await? + .as_deref() + == Some(b"This is a file!"), + "couldn't download attachment" + ); + api.delete_release_attachment("TestingAdmin", "test", release.id, attachment.id) .await .wrap_err("failed to deleted attachment")?;