From bf531a1bd94cdf37f3917850e11f00dacded5a3c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 14 Dec 2024 14:29:16 +0000 Subject: [PATCH] test: nextcloud card create - with/without description --- src/nextcloud/tests/card/create.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/nextcloud/tests/card/create.rs b/src/nextcloud/tests/card/create.rs index 83911e5..3d2d54b 100644 --- a/src/nextcloud/tests/card/create.rs +++ b/src/nextcloud/tests/card/create.rs @@ -37,8 +37,10 @@ fn ctx() -> FullCtx { } #[rstest::rstest] +#[case::no_desc(None)] +#[case::desc(Some(s!("my new description")))] #[test_log::test(tokio::test)] -async fn dump(ctx: FullCtx, stack_id: NextcloudStackId) { +async fn dump(ctx: FullCtx, stack_id: NextcloudStackId, #[case] description: Option) { //given let prt = ctx.prt.clone(); let prt = prt.as_test().unwrap(); @@ -48,7 +50,7 @@ async fn dump(ctx: FullCtx, stack_id: NextcloudStackId) { dump: true, stack_id: stack_id.into(), title: "my new card".to_string(), - description: Some("my new description".to_string()), + description, })) .execute(ctx) .await @@ -63,8 +65,10 @@ async fn dump(ctx: FullCtx, stack_id: NextcloudStackId) { } #[rstest::rstest] +#[case::no_desc(None)] +#[case::desc(Some(s!("my new description")))] #[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) { //given let prt = ctx.prt.clone(); let prt = prt.as_test().unwrap(); @@ -74,7 +78,7 @@ async fn no_dump(ctx: FullCtx, stack_id: NextcloudStackId) { dump: false, stack_id: stack_id.into(), title: "my new card".to_string(), - description: Some("my new description".to_string()), + description, })) .execute(ctx) .await