From eb8a797c9e7ce01e3345edc20db1486764c84d08 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 13 Feb 2015 13:48:31 -0600 Subject: Block notifications in the volume event instead of in the notification one so that high volume warnings can get through --- tests/notifications-test.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tests/notifications-test.cc') diff --git a/tests/notifications-test.cc b/tests/notifications-test.cc index 9c98e4f..22402cd 100644 --- a/tests/notifications-test.cc +++ b/tests/notifications-test.cc @@ -319,7 +319,6 @@ TEST_F(NotificationsTest, HighVolume) { EXPECT_EQ("Volume", notev[0].summary); EXPECT_EQ("", notev[0].body); EXPECT_GVARIANT_EQ("@s 'false'", notev[0].hints["x-canonical-value-bar-tint"]); - EXPECT_GVARIANT_EQ("@i 50", notev[0].hints["value"]); /* Set high volume with volume change */ notifications->clearNotifications(); @@ -327,11 +326,10 @@ TEST_F(NotificationsTest, HighVolume) { volume_control_set_volume(volumeControl.get(), 0.90); loop(50); notev = notifications->getNotifications(); - ASSERT_EQ(1, notev.size()); + ASSERT_LT(0, notev.size()); EXPECT_EQ("Volume", notev[0].summary); EXPECT_EQ("High volume", notev[0].body); EXPECT_GVARIANT_EQ("@s 'true'", notev[0].hints["x-canonical-value-bar-tint"]); - EXPECT_GVARIANT_EQ("@i 90", notev[0].hints["value"]); /* Move it back */ volume_control_mock_set_mock_high_volume(VOLUME_CONTROL_MOCK(volumeControl.get()), FALSE); @@ -348,5 +346,4 @@ TEST_F(NotificationsTest, HighVolume) { EXPECT_EQ("Volume", notev[0].summary); EXPECT_EQ("High volume", notev[0].body); EXPECT_GVARIANT_EQ("@s 'true'", notev[0].hints["x-canonical-value-bar-tint"]); - EXPECT_GVARIANT_EQ("@i 90", notev[0].hints["value"]); } -- cgit v1.2.3