Skip to content

Commit

Permalink
Add Test to Cover #177
Browse files Browse the repository at this point in the history
refs #177
  • Loading branch information
stefanzweifel committed Sep 25, 2021
1 parent 983386a commit f6048aa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/git-auto-commit.bats
Expand Up @@ -477,3 +477,19 @@ git_auto_commit() {
run git status
refute_output --partial 'nested/new-file-b.py'
}

@test "it does not throw an error if not changes are detected and SKIP_DIRTY_CHECK is false" {
INPUT_FILE_PATTERN="."
INPUT_SKIP_DIRTY_CHECK=false
INPUT_SKIP_FETCH=false

run git_auto_commit

assert_success

assert_line "INPUT_REPOSITORY value: ${INPUT_REPOSITORY}"
assert_line "::set-output name=changes_detected::false"

run git status
assert_output --partial 'nothing to commit, working tree clean'
}

0 comments on commit f6048aa

Please sign in to comment.