test: nextcloud card create - with/without description
Some checks failed
Test / build (map[name:nightly]) (push) Successful in 1m50s
Test / build (map[name:stable]) (push) Successful in 1m55s
Release Please / Release-plz (push) Failing after 34s

This commit is contained in:
Paul Campbell 2024-12-14 14:29:16 +00:00
parent f68ae162bc
commit bf531a1bd9

View file

@ -37,8 +37,10 @@ fn ctx() -> FullCtx {
} }
#[rstest::rstest] #[rstest::rstest]
#[case::no_desc(None)]
#[case::desc(Some(s!("my new description")))]
#[test_log::test(tokio::test)] #[test_log::test(tokio::test)]
async fn dump(ctx: FullCtx, stack_id: NextcloudStackId) { async fn dump(ctx: FullCtx, stack_id: NextcloudStackId, #[case] description: Option<String>) {
//given //given
let prt = ctx.prt.clone(); let prt = ctx.prt.clone();
let prt = prt.as_test().unwrap(); let prt = prt.as_test().unwrap();
@ -48,7 +50,7 @@ async fn dump(ctx: FullCtx, stack_id: NextcloudStackId) {
dump: true, dump: true,
stack_id: stack_id.into(), stack_id: stack_id.into(),
title: "my new card".to_string(), title: "my new card".to_string(),
description: Some("my new description".to_string()), description,
})) }))
.execute(ctx) .execute(ctx)
.await .await
@ -63,8 +65,10 @@ async fn dump(ctx: FullCtx, stack_id: NextcloudStackId) {
} }
#[rstest::rstest] #[rstest::rstest]
#[case::no_desc(None)]
#[case::desc(Some(s!("my new description")))]
#[test_log::test(tokio::test)] #[test_log::test(tokio::test)]
async fn no_dump(ctx: FullCtx, stack_id: NextcloudStackId) { async fn no_dump(ctx: FullCtx, stack_id: NextcloudStackId, #[case] description: Option<String>) {
//given //given
let prt = ctx.prt.clone(); let prt = ctx.prt.clone();
let prt = prt.as_test().unwrap(); let prt = prt.as_test().unwrap();
@ -74,7 +78,7 @@ async fn no_dump(ctx: FullCtx, stack_id: NextcloudStackId) {
dump: false, dump: false,
stack_id: stack_id.into(), stack_id: stack_id.into(),
title: "my new card".to_string(), title: "my new card".to_string(),
description: Some("my new description".to_string()), description,
})) }))
.execute(ctx) .execute(ctx)
.await .await