diff options
author | Cyborus <cyborus@cyborus.xyz> | 2023-12-15 18:00:29 +0100 |
---|---|---|
committer | Cyborus <cyborus@cyborus.xyz> | 2023-12-15 18:00:29 +0100 |
commit | e725903eb973b5eb125f0fb7ce0cfa4c48080a4a (patch) | |
tree | ab96b9a419dbf3895d6602b01d6b4fad3248f670 | |
parent | add release download methods (diff) | |
download | forgejo-api-e725903eb973b5eb125f0fb7ce0cfa4c48080a4a.tar.xz forgejo-api-e725903eb973b5eb125f0fb7ce0cfa4c48080a4a.zip |
add download test
-rw-r--r-- | tests/ci_test.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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")?; |