about summary refs log tree commit diff stats
path: root/tests/unittests/test_preferences.c
blob: ae158ebe8de34503cae4db049ade99186ddb3f32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>

#include "config/preferences.h"

void
statuses_console_defaults_to_all(void** state)
{
    char* setting = prefs_get_string(PREF_STATUSES_CONSOLE);

    assert_non_null(setting);
    assert_string_equal("all", setting);
    g_free(setting);
}

void
statuses_chat_defaults_to_all(void** state)
{
    char* setting = prefs_get_string(PREF_STATUSES_CHAT);

    assert_non_null(setting);
    assert_string_equal("none", setting);
    g_free(setting);
}

void
statuses_muc_defaults_to_all(void** state)
{
    char* setting = prefs_get_string(PREF_STATUSES_MUC);

    assert_non_null(setting);
    assert_string_equal("none", setting);
    g_free(setting);
}