From 0a88a8d7aee8d8ee253de43f031c0811d8015a3a Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Sat, 9 Sep 2023 12:37:35 +0200 Subject: Remove osd-notify remnants and use native notification timeout --- tests/test-sound.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'tests/test-sound.cpp') diff --git a/tests/test-sound.cpp b/tests/test-sound.cpp index f808db6..19dffe3 100644 --- a/tests/test-sound.cpp +++ b/tests/test-sound.cpp @@ -1,5 +1,6 @@ /* * Copyright 2014-2016 Canonical Ltd. + * Copyright 2023 Robert Tari * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -15,6 +16,7 @@ * * Authors: * Charles Kerr + * Robert Tari */ #include @@ -89,19 +91,15 @@ TEST_F(NotificationFixture, InteractiveDuration) g_variant_get_child (params, 0, "&s", &str); ASSERT_STREQ(APP_NAME, str); - // confirm that the icon passed to Notify was "alarm-clock" + // confirm that the icon passed to Notify was "calendar-app" g_variant_get_child (params, 2, "&s", &str); ASSERT_STREQ("calendar-app", str); - // confirm that the hints passed to Notify included a timeout matching duration_minutes + // confirm that the timeout passed to Notify matches duration_minutes int32_t i32; - bool b; - auto hints = g_variant_get_child_value (params, 6); - b = g_variant_lookup (hints, HINT_TIMEOUT, "i", &i32); - EXPECT_TRUE(b); + g_variant_get_child (params, 7, "i", &i32); const auto duration = std::chrono::minutes(duration_minutes); EXPECT_EQ(std::chrono::duration_cast(duration).count(), i32); - g_variant_unref(hints); ne.reset(); } -- cgit v1.2.3