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]
#[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<String>) {
//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<String>) {
//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