diff --git a/tests/test_remove.bats b/tests/test_remove.bats index 524c4c41..5f5563ce 100644 --- a/tests/test_remove.bats +++ b/tests/test_remove.bats @@ -111,23 +111,3 @@ function _has_line { run git secret remove -Z "$SECOND_FILE" [ "$status" -ne 0 ] } - -@test "run 'removeperson' with email added twice" { - local email="$TEST_DEFAULT_USER" - - # This should fail because you can't add the same email twice - run git secret tell "$email" - [ "$status" -ne 0 ] - - # Then test that the normal remove test runs - run git secret removeperson "$email" - [ "$status" -eq 0 ] - - # Testing output: - [[ "$output" == *"$email"* ]] - - # Then whoknows must return an error with status code 1, because no one is in list - run git secret whoknows - [ "$status" -eq 1 ] -} - diff --git a/tests/test_removeperson.bats b/tests/test_removeperson.bats index d81a690c..64f03cae 100644 --- a/tests/test_removeperson.bats +++ b/tests/test_removeperson.bats @@ -89,3 +89,23 @@ function teardown { run git secret killperson [ "$status" -eq 1 ] } + +@test "run 'removeperson' with email added twice" { + local email="$TEST_DEFAULT_USER" + + # This should fail because you can't add the same email twice + run git secret tell "$email" + [ "$status" -ne 0 ] + + # Then test that the normal remove test runs + run git secret removeperson "$email" + [ "$status" -eq 0 ] + + # Testing output: + [[ "$output" == *"$email"* ]] + + # Then whoknows must return an error with status code 1, because no one is in list + run git secret whoknows + [ "$status" -eq 1 ] +} +