diff options
author | Tad Fisher <tadfisher@gmail.com> | 2018-03-04 11:26:13 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-04 11:26:13 -0800 |
commit | f88e6a338cd976bfa4e14567c1f3024ddc58ab7d (patch) | |
tree | 4549da42122c877121c38b2956abf5fbd479c554 /test/insert.t | |
parent | 0737f1f3e8ad8e31b7b5d7eb9b6a6a21eb3781e9 (diff) | |
parent | 948c2f04cbaf2f065b0c21b80de82f1f0c946e54 (diff) |
Merge pull request #56 from tadfisher/develop
Merge branch 'develop' into master
Diffstat (limited to 'test/insert.t')
-rwxr-xr-x | test/insert.t | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/insert.t b/test/insert.t index e0d2441..1c8ddb2 100755 --- a/test/insert.t +++ b/test/insert.t @@ -112,4 +112,22 @@ test_expect_success 'Force overwrites key URI' ' [[ $("$PASS" show passfile) == "$uri2" ]] ' +test_expect_success 'Insert passfile from secret with options(issuer, accountname)' ' + secret="JBSWY3DPEHPK3PXP" + uri="otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example" + + test_pass_init && + "$PASS" otp insert -s -i Example -a alice@google.com passfile <<< "$secret" && + echo [[ $("$PASS" show passfile) == "$uri" ]] +' + +test_expect_success 'Insert from secret without passfile' ' + secret="JBSWY3DPEHPK3PXP" + uri="otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example" + + test_pass_init && + "$PASS" otp insert -s -i Example -a alice@google.com <<< "$secret" && + echo [[ $("$PASS" show Example/alice@google.com) == "$uri" ]] +' + test_done |