about summary refs log tree commit diff stats
path: root/tests/unittests
diff options
context:
space:
mode:
authorSteffen Jaeckel <jaeckel-floss@eyet-services.de>2022-03-31 11:22:14 +0200
committerSteffen Jaeckel <jaeckel-floss@eyet-services.de>2022-03-31 14:29:56 +0200
commitf284641710bd25232676893327b5d46968ca481b (patch)
tree095e0056e2eac93318b3ffc8b3f8a3582bc9b0d4 /tests/unittests
parentc53b78ea1c115ff3e541debb772221b40aab422e (diff)
downloadprofani-tty-f284641710bd25232676893327b5d46968ca481b.tar.gz
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>
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/test_cmd_account.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unittests/test_cmd_account.c b/tests/unittests/test_cmd_account.c
index 69721311..c0eac0e3 100644
--- a/tests/unittests/test_cmd_account.c
+++ b/tests/unittests/test_cmd_account.c
@@ -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);
>72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148