mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-11-04 23:51:17 +00:00
94fa13af4c
We only have a single source of settings, so we should reflect that by using a singleton. This also reduces our LoC. This doesn't impair our ability to run tests because there we run with GSETTINGS_BACKEND=memory
37 lines
875 B
C
37 lines
875 B
C
/*
|
|
* Copyright (C) 2022 Purism SPC
|
|
*
|
|
* SPDX-License-Identifier: GPL-3.0+
|
|
*
|
|
* Author: Evangelos Ribeiro Tzaras <evangelos.tzaras@puri.sm>
|
|
*/
|
|
|
|
#include "calls-best-match.h"
|
|
#include "calls-contacts-provider.h"
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
static void
|
|
test_contacts_null_contact (void)
|
|
{
|
|
g_autoptr (CallsContactsProvider) contacts_provider =
|
|
calls_contacts_provider_new ();
|
|
CallsBestMatch *best_match;
|
|
|
|
best_match = calls_contacts_provider_lookup_id (contacts_provider, NULL);
|
|
g_assert_null (best_match);
|
|
|
|
g_assert_cmpstr (calls_best_match_get_primary_info (best_match), ==, "Anonymous caller");
|
|
g_assert_cmpstr (calls_best_match_get_secondary_info (best_match), ==, "");
|
|
}
|
|
|
|
int
|
|
main (int argc,
|
|
char *argv[])
|
|
{
|
|
gtk_test_init (&argc, &argv, NULL);
|
|
|
|
g_test_add_func ("/Calls/contacts/null", (GTestFunc) test_contacts_null_contact);
|
|
|
|
g_test_run ();
|
|
}
|