add test for new before/after_id filters

This commit is contained in:
Robin Appelman 2022-06-28 20:22:33 +02:00
commit 2181c0acd3
4 changed files with 161 additions and 203 deletions

View file

@ -386,6 +386,30 @@ async fn main() -> Result<()> {
})
.await?;
test.step("list id filter after", |client| async move {
let list = client
.list(ListParams::default().with_after_id(3), 1)
.await?;
assert_eq(list.len(), 2)?;
assert_eq(list[0].id, 5)?;
assert_eq(list[1].id, 4)?;
Ok(())
})
.await?;
test.step("list id filter before", |client| async move {
let list = client
.list(ListParams::default().with_before_id(3), 1)
.await?;
assert_eq(list.len(), 2)?;
assert_eq(list[0].id, 2)?;
assert_eq(list[1].id, 1)?;
Ok(())
})
.await?;
test.step("list by uploader", |client| async move {
let list = client
.list_uploads(