aboutsummaryrefslogtreecommitdiff
path: root/test/code.t
diff options
context:
space:
mode:
authorTad Fisher <tadfisher@gmail.com>2017-03-20 10:59:42 -0700
committerGitHub <noreply@github.com>2017-03-20 10:59:42 -0700
commitb6b23de6f787c3fc244484f613f84ffa6e3cb201 (patch)
tree65f884da2840a54122c6ad09701d4f6a845139e2 /test/code.t
parent310322fdeee57330e92afdf0810ac5200163d08d (diff)
parent4cc027a139396742983405782ab70a766dcaffb0 (diff)
Merge pull request #20 from tadfisher/default-passname
Generate default passname from URI label; remove url param
Diffstat (limited to 'test/code.t')
-rwxr-xr-xtest/code.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/code.t b/test/code.t
index 095cdd5..4faea03 100755
--- a/test/code.t
+++ b/test/code.t
@@ -8,7 +8,7 @@ test_expect_success 'Generates TOTP code' '
uri="otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example"
test_pass_init &&
- "$PASS" otp insert "$uri" passfile &&
+ "$PASS" otp insert passfile <<< "$uri" &&
code=$("$PASS" otp passfile) &&
[[ ${#code} -eq 6 ]]
'
@@ -18,7 +18,7 @@ test_expect_success 'Generates HOTP code and increments counter' '
inc="otpauth://hotp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&counter=11&issuer=Example"
test_pass_init &&
- "$PASS" otp insert "$uri" passfile &&
+ "$PASS" otp insert passfile <<< "$uri" &&
code=$("$PASS" otp passfile) &&
[[ ${#code} -eq 6 ]] &&
[[ $("$PASS" otp uri passfile) == "$inc" ]]