add download test
This commit is contained in:
parent
2e50a93f1e
commit
e725903eb9
|
@ -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")?;
|
||||
|
|
Loading…
Reference in a new issue