mirror of
https://github.com/sobolevn/git-secret
synced 2024-10-31 21:20:29 +00:00
parent
b6711e2ac5
commit
bf45916088
@ -111,3 +111,23 @@ 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 ]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user