about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_cmd_otr.c62
-rw-r--r--tests/unittests/test_cmd_otr.h4
-rw-r--r--tests/unittests/ui/stub_ui.c1
-rw-r--r--tests/unittests/unittests.c8
4 files changed, 1 insertions, 74 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));
diff --git a/tests/unittests/test_cmd_otr.h b/tests/unittests/test_cmd_otr.h
index 8ef182e9..469d7c54 100644
--- a/tests/unittests/test_cmd_otr.h
+++ b/tests/unittests/test_cmd_otr.h
@@ -10,10 +10,6 @@ void cmd_otr_log_off_disables_logging(void **state);
 void cmd_otr_redact_redacts_logging(void **state);
 void cmd_otr_log_on_shows_warning_when_chlog_disabled(void **state);
 void cmd_otr_log_redact_shows_warning_when_chlog_disabled(void **state);
-void cmd_otr_warn_shows_usage_when_no_args(void **state);
-void cmd_otr_warn_shows_usage_when_invalid_arg(void **state);
-void cmd_otr_warn_on_enables_unencrypted_warning(void **state);
-void cmd_otr_warn_off_disables_unencrypted_warning(void **state);
 void cmd_otr_libver_shows_libotr_version(void **state);
 void cmd_otr_gen_shows_message_when_not_connected(void **state);
 void cmd_otr_gen_generates_key_for_connected_account(void **state);
diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c
index 085ff03b..6d008414 100644
--- a/tests/unittests/ui/stub_ui.c
+++ b/tests/unittests/ui/stub_ui.c
@@ -447,6 +447,7 @@ void cons_roster_setting(void) {}
 void cons_presence_setting(void) {}
 void cons_wrap_setting(void) {}
 void cons_winstidy_setting(void) {}
+void cons_encwarn_setting(void) {}
 void cons_time_setting(void) {}
 void cons_mouse_setting(void) {}
 void cons_statuses_setting(void) {}
diff --git a/tests/unittests/unittests.c b/tests/unittests/unittests.c
index a0fb8886..d20cf0b2 100644
--- a/tests/unittests/unittests.c
+++ b/tests/unittests/unittests.c
@@ -500,14 +500,6 @@ int main(int argc, char* argv[]) {
         unit_test_setup_teardown(cmd_otr_log_redact_shows_warning_when_chlog_disabled,
             load_preferences,
             close_preferences),
-        unit_test(cmd_otr_warn_shows_usage_when_no_args),
-        unit_test(cmd_otr_warn_shows_usage_when_invalid_arg),
-        unit_test_setup_teardown(cmd_otr_warn_on_enables_unencrypted_warning,
-            load_preferences,
-            close_preferences),
-        unit_test_setup_teardown(cmd_otr_warn_off_disables_unencrypted_warning,
-            load_preferences,
-            close_preferences),
         unit_test(cmd_otr_libver_shows_libotr_version),
         unit_test(cmd_otr_gen_shows_message_when_not_connected),
         unit_test(cmd_otr_gen_generates_key_for_connected_account),