less duplication

Print error message from `_string_matches_one_of()` instead of forming
an error message manually that contains the same entries that were checked
in `_string_matches_one_of()`.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2022-03-31 11:22:14 +02:00
parent c53b78ea1c
commit f284641710
2 changed files with 58 additions and 37 deletions

View File

@@ -571,7 +571,8 @@ cmd_account_show_message_for_invalid_otr_policy(void** state)
expect_any(accounts_account_exists, account_name);
will_return(accounts_account_exists, TRUE);
expect_cons_show("OTR policy must be one of: manual, opportunistic or always.");
expect_cons_show("Invalid OTR policy: 'bad_otr_policy'");
expect_cons_show("OTR policy must be one of: 'manual', 'opportunistic' or 'always'.");
gboolean result = cmd_account_set(NULL, CMD_ACCOUNT, args);
assert_true(result);