Skip to content

Commit

Permalink
GH-692: add test for the error case
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarshg6 committed Jul 12, 2023
1 parent 60ba1af commit 1c05e69
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions masq/src/commands/set_configuration_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ mod tests {
test_command_execution("min-hops", "6");
}

#[test]
#[should_panic(expected = "error: Found argument '--invalid-arg' which wasn't expected, or isn't valid in this context")]
fn command_execution_fails_for_invalid_arg() {
test_command_execution("invalid-arg", "123");
}

fn test_command_execution(name: &str, value: &str) {
let transact_params_arc = Arc::new(Mutex::new(vec![]));
let mut context = CommandContextMock::new()
Expand Down

0 comments on commit 1c05e69

Please sign in to comment.