diff options
author | James Booth <boothj5@gmail.com> | 2015-06-21 21:07:57 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-06-21 21:07:57 +0100 |
commit | 446027b9505342c09f62f6d7a279c65a0d1db107 (patch) | |
tree | 2dde6c8ded47bb6880265e0b83a8aef25ad3e5ab /tests/unittests/test_cmd_otr.c | |
parent | e72ddf5488a4cc2a39ed8037181a39d71768eff6 (diff) | |
download | profani-tty-446027b9505342c09f62f6d7a279c65a0d1db107.tar.gz |
Moved setting otr.warn -> enc.warn
Diffstat (limited to 'tests/unittests/test_cmd_otr.c')
-rw-r--r-- | tests/unittests/test_cmd_otr.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/tests/unittests/test_cmd_otr.c b/tests/unittests/test_cmd_otr.c index dd1898a9..7d4a3291 100644 --- a/tests/unittests/test_cmd_otr.c +++ b/tests/unittests/test_cmd_otr.c @@ -167,68 +167,6 @@ void cmd_otr_log_redact_shows_warning_when_chlog_disabled(void **state) free(help); } -void cmd_otr_warn_shows_usage_when_no_args(void **state) -{ - CommandHelp *help = malloc(sizeof(CommandHelp)); - help->usage = "Some usage"; - gchar *args[] = { "warn", NULL }; - - expect_cons_show("Usage: Some usage"); - - gboolean result = cmd_otr(NULL, args, *help); - assert_true(result); - - free(help); -} - -void cmd_otr_warn_shows_usage_when_invalid_arg(void **state) -{ - CommandHelp *help = malloc(sizeof(CommandHelp)); - help->usage = "Some usage"; - gchar *args[] = { "warn", "badarg", NULL }; - - expect_cons_show("Usage: Some usage"); - - gboolean result = cmd_otr(NULL, args, *help); - assert_true(result); - - free(help); -} - -void cmd_otr_warn_on_enables_unencrypted_warning(void **state) -{ - CommandHelp *help = malloc(sizeof(CommandHelp)); - gchar *args[] = { "warn", "on", NULL }; - prefs_set_boolean(PREF_OTR_WARN, FALSE); - - expect_cons_show("OTR warning message enabled."); - - gboolean result = cmd_otr(NULL, args, *help); - gboolean otr_warn_enabled = prefs_get_boolean(PREF_OTR_WARN); - - assert_true(result); - assert_true(otr_warn_enabled); - - free(help); -} - -void cmd_otr_warn_off_disables_unencrypted_warning(void **state) -{ - CommandHelp *help = malloc(sizeof(CommandHelp)); - gchar *args[] = { "warn", "off", NULL }; - prefs_set_boolean(PREF_OTR_WARN, TRUE); - - expect_cons_show("OTR warning message disabled."); - - gboolean result = cmd_otr(NULL, args, *help); - gboolean otr_warn_enabled = prefs_get_boolean(PREF_OTR_WARN); - - assert_true(result); - assert_false(otr_warn_enabled); - - free(help); -} - void cmd_otr_libver_shows_libotr_version(void **state) { CommandHelp *help = malloc(sizeof(CommandHelp)); |