test cat with wrong filename

pull/142/head
Josh Rabinowitz 7 years ago
parent 02e4bde64e
commit d5b1dd7829

@ -29,6 +29,7 @@ function teardown {
@test "run 'cat' with password argument" {
cp "$FILE_TO_HIDE" "${FILE_TO_HIDE}2"
rm -f "$FILE_TO_HIDE"
local password=$(test_user_password "$TEST_DEFAULT_USER")
@ -38,6 +39,12 @@ function teardown {
# $output is the output from 'git secret cat' above
[ "$FILE_CONTENTS" == "$output" ]
rm "${FILE_TO_HIDE}2"
}
@test "run 'cat' with wrong filename" {
run git secret reveal -d "$TEST_GPG_HOMEDIR" -p "$password" NO_SUCH_FILE
[ "$status" -eq 2 ]
}

Loading…
Cancel
Save