From 3399c44a72fa52113d3935c2040765a9d5e42f2c Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 14 Jan 2019 11:06:07 -0800 Subject: Add tests for otp command This change adds a set of tests for the otp command. We cover some variants of the status, set, get, and clear. Testing all the possible combinations is out of scope and so only a more or less arbitrary subset of arguments was chosen. --- nitrocli/src/args.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nitrocli/src/args.rs') diff --git a/nitrocli/src/args.rs b/nitrocli/src/args.rs index b15ca65..789001e 100644 --- a/nitrocli/src/args.rs +++ b/nitrocli/src/args.rs @@ -463,7 +463,7 @@ fn otp_get(ctx: &mut ExecCtx<'_>, args: Vec) -> Result<()> { let _ = parser.refer(&mut algorithm).add_option( &["-a", "--algorithm"], argparse::Store, - "The OTP algorithm to use (hotp|totp)", + "The OTP algorithm to use (hotp|totp, default: totp)", ); let _ = parser.refer(&mut time).add_option( &["-t", "--time"], @@ -497,7 +497,7 @@ pub fn otp_set(ctx: &mut ExecCtx<'_>, args: Vec) -> Result<()> { let _ = parser.refer(&mut algorithm).add_option( &["-a", "--algorithm"], argparse::Store, - "The OTP algorithm to use (hotp or totp, default: totp)", + "The OTP algorithm to use (hotp|totp, default: totp)", ); let _ = parser.refer(&mut name).required().add_argument( "name", @@ -577,7 +577,7 @@ fn otp_clear(ctx: &mut ExecCtx<'_>, args: Vec) -> Result<()> { let _ = parser.refer(&mut algorithm).add_option( &["-a", "--algorithm"], argparse::Store, - "The OTP algorithm to use (hotp|totp)", + "The OTP algorithm to use (hotp|totp, default: totp)", ); parse(ctx, &parser, args)?; drop(parser); -- cgit v1.2.1