summaryrefslogtreecommitdiff
path: root/tests/t0300-reencryption.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtests/t0300-reencryption.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/t0300-reencryption.sh b/tests/t0300-reencryption.sh
index f7968a4..fed4b5b 100755
--- a/tests/t0300-reencryption.sh
+++ b/tests/t0300-reencryption.sh
@@ -20,8 +20,11 @@ gpg_keys_from_group() {
canonicalize_gpg_keys "${keys[@]}"
}
+test_expect_success 'Setup initial key and git' '
+ $PASS init $KEY1 && $PASS git init
+'
+
test_expect_success 'Root key encryption' '
- $PASS init $KEY1 &&
$PASS insert -e folder/cred1 <<<"$INITIAL_PASSWORD" &&
[[ $(canonicalize_gpg_keys "$KEY1") == "$(gpg_keys_from_encrypted_file "$PASSWORD_STORE_DIR/folder/cred1.gpg")" ]]
'
@@ -89,5 +92,8 @@ test_expect_success 'Password lived through all transformations' '
[[ $($PASS show anotherfolder2/anotherfolder/cred1) == "$INITIAL_PASSWORD" ]]
'
-test_done
+test_expect_success 'Git picked up all changes throughout' '
+ [[ -z $(git status --porcelain 2>&1) ]]
+'
+test_done