From 40517171f72309e46f833baa8e0f902d064911da Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 22 Jun 2024 18:46:28 +0200 Subject: [PATCH] test: separate test for git name/email See https://git.coopcloud.tech/coop-cloud/abra/pulls/405 --- tests/integration/recipe_new.bats | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/integration/recipe_new.bats b/tests/integration/recipe_new.bats index b1f8e150..c0c8da20 100644 --- a/tests/integration/recipe_new.bats +++ b/tests/integration/recipe_new.bats @@ -23,14 +23,14 @@ teardown(){ } @test "create new recipe" { - run $ABRA recipe new foobar --git-name foo --git-email foo@example.com + run $ABRA recipe new foobar assert_success assert_output --partial 'Your new foobar recipe has been created' assert_exists "$ABRA_DIR/recipes/foobar" } @test "create new app from new recipe" { - run $ABRA recipe new foobar --git-name foo --git-email foo@example.com + run $ABRA recipe new foobar assert_success run $ABRA app new foobar \ @@ -40,3 +40,16 @@ teardown(){ assert_success assert_output --partial 'A new foobar app has been created!' } + +@test "create new recipe with git credentials" { + run $ABRA recipe new foobar --git-name fooUser --git-email foo@example.com + assert_success + assert_output --partial 'Your new foobar recipe has been created' + assert_exists "$ABRA_DIR/recipes/foobar" + + run bash -c 'git -C "$ABRA_DIR/recipes/foobar" log -n 1' + assert_success + assert_output --partial 'fooUser' + assert_output --partial 'foo@example.com' +} + -- 2.47.2