Skip to content

Commit

Permalink
Add urls prop to NotificationListHistory test
Browse files Browse the repository at this point in the history
  • Loading branch information
BinaryInk committed Jan 8, 2025
1 parent 97a5a74 commit 7789fbc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/dbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ TEST test_dbus_cb_dunst_NotificationListHistory(void)
n->summary = g_strdup("Testing");
n->urgency = 2;
n->stack_tag = g_strdup("test-stack-tag");
n->urls = g_strdup("https://dunst-project.org/");
const char *urgency1 = notification_urgency_to_string(n->urgency);
queues_history_push(n);

Expand All @@ -539,6 +540,7 @@ TEST test_dbus_cb_dunst_NotificationListHistory(void)
n->summary = g_strdup("More testing");
n->urgency = 0;
n->stack_tag = g_strdup("test-stack-tag");
n->urls = g_strdup("https://dunst-project.org/");
const char *urgency2 = notification_urgency_to_string(n->urgency);
queues_history_push(n);

Expand Down Expand Up @@ -579,6 +581,10 @@ TEST test_dbus_cb_dunst_NotificationListHistory(void)
ASSERT_STR_EQ("test-stack-tag", str);
g_free(str);

ASSERT(g_variant_dict_lookup(&d, "urls", "s", &str));
ASSERT_STR_EQ("https://dunst-project.org/", str);
g_free(str);

g_variant_unref(dict);
dict = g_variant_iter_next_value(&array_iter);
g_variant_dict_clear(&d);
Expand All @@ -603,6 +609,10 @@ TEST test_dbus_cb_dunst_NotificationListHistory(void)
ASSERT_STR_EQ("test-stack-tag", str);
g_free(str);

ASSERT(g_variant_dict_lookup(&d, "urls", "s", &str));
ASSERT_STR_EQ("https://dunst-project.org/", str);
g_free(str);

g_variant_dict_clear(&d);
g_variant_unref(dict);
g_variant_unref(array);
Expand Down

0 comments on commit 7789fbc

Please sign in to comment.