test: nextcloud card create - with/without description
This commit is contained in:
parent
f68ae162bc
commit
bf531a1bd9
1 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue