@@ -528,12 +528,20 @@ TEST test_dbus_cb_dunst_NotificationListHistory(void)
528
528
gint64 timestamp1 = n -> timestamp ;
529
529
n -> appname = g_strdup ("dunstify" );
530
530
n -> summary = g_strdup ("Testing" );
531
+ n -> urgency = 2 ;
532
+ n -> stack_tag = g_strdup ("test-stack-tag" );
533
+ n -> urls = g_strdup ("https://dunst-project.org/" );
534
+ const char * urgency1 = notification_urgency_to_string (n -> urgency );
531
535
queues_history_push (n );
532
536
533
537
n = notification_create ();
534
538
gint64 timestamp2 = n -> timestamp ;
535
539
n -> appname = g_strdup ("notify-send" );
536
540
n -> summary = g_strdup ("More testing" );
541
+ n -> urgency = 0 ;
542
+ n -> stack_tag = g_strdup ("test-stack-tag" );
543
+ n -> urls = g_strdup ("https://dunst-project.org/" );
544
+ const char * urgency2 = notification_urgency_to_string (n -> urgency );
537
545
queues_history_push (n );
538
546
539
547
GVariant * result = dbus_invoke_ifac ("NotificationListHistory" , NULL , DUNST_IFAC );
@@ -565,6 +573,18 @@ TEST test_dbus_cb_dunst_NotificationListHistory(void)
565
573
ASSERT (g_variant_dict_lookup (& d , "timestamp" , "x" , & int64 ));
566
574
ASSERT_EQ (timestamp2 , int64 );
567
575
576
+ ASSERT (g_variant_dict_lookup (& d , "urgency" , "s" , & str ));
577
+ ASSERT_STR_EQ (urgency2 , str );
578
+ g_free (str );
579
+
580
+ ASSERT (g_variant_dict_lookup (& d , "stack_tag" , "s" , & str ));
581
+ ASSERT_STR_EQ ("test-stack-tag" , str );
582
+ g_free (str );
583
+
584
+ ASSERT (g_variant_dict_lookup (& d , "urls" , "s" , & str ));
585
+ ASSERT_STR_EQ ("https://dunst-project.org/" , str );
586
+ g_free (str );
587
+
568
588
g_variant_unref (dict );
569
589
dict = g_variant_iter_next_value (& array_iter );
570
590
g_variant_dict_clear (& d );
@@ -581,6 +601,18 @@ TEST test_dbus_cb_dunst_NotificationListHistory(void)
581
601
ASSERT (g_variant_dict_lookup (& d , "timestamp" , "x" , & int64 ));
582
602
ASSERT_EQ (timestamp1 , int64 );
583
603
604
+ ASSERT (g_variant_dict_lookup (& d , "urgency" , "s" , & str ));
605
+ ASSERT_STR_EQ (urgency1 , str );
606
+ g_free (str );
607
+
608
+ ASSERT (g_variant_dict_lookup (& d , "stack_tag" , "s" , & str ));
609
+ ASSERT_STR_EQ ("test-stack-tag" , str );
610
+ g_free (str );
611
+
612
+ ASSERT (g_variant_dict_lookup (& d , "urls" , "s" , & str ));
613
+ ASSERT_STR_EQ ("https://dunst-project.org/" , str );
614
+ g_free (str );
615
+
584
616
g_variant_dict_clear (& d );
585
617
g_variant_unref (dict );
586
618
g_variant_unref (array );
0 commit comments