From e4b55aa627bba56186b8df30cbd9f27177cfe1ad Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 6 Mar 2015 22:21:09 -0600 Subject: Check the message's menu --- tests/indicator-test.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/indicator-test.cpp b/tests/indicator-test.cpp index afb55d0..2a711f0 100644 --- a/tests/indicator-test.cpp +++ b/tests/indicator-test.cpp @@ -74,8 +74,10 @@ TEST_F(IndicatorTest, SingleMessage) { ASSERT_NE(nullptr, app); messaging_menu_app_register(app.get()); + EXPECT_EVENTUALLY_ACTION_EXISTS("test.launch"); + auto msg = std::shared_ptr(messaging_menu_message_new( - "test-id", + "testid", nullptr, /* no icon */ "Test Title", "A subtitle too", @@ -83,6 +85,12 @@ TEST_F(IndicatorTest, SingleMessage) { 0), [](MessagingMenuMessage * msg) { g_clear_object(&msg); }); messaging_menu_app_append_message(app.get(), msg.get(), nullptr, FALSE); - EXPECT_EVENTUALLY_ACTION_EXISTS("test.launch"); + EXPECT_EVENTUALLY_ACTION_EXISTS("test.msg.testid"); + + setMenu("/com/canonical/indicator/messages/phone"); + EXPECT_EVENTUALLY_MENU_ATTRIB(std::vector({0, 0, 0}), "x-canonical-type", "com.canonical.indicator.messages.messageitem"); + EXPECT_MENU_ATTRIB(std::vector({0, 0, 0}), "x-canonical-message-id", "testid"); + EXPECT_MENU_ATTRIB(std::vector({0, 0, 0}), "x-canonical-subtitle", "A subtitle too"); + EXPECT_MENU_ATTRIB(std::vector({0, 0, 0}), "x-canonical-text", "You only like me for my body"); } -- cgit v1.2.3