aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2015-03-06 22:21:09 -0600
committerTed Gould <ted@gould.cx>2015-03-06 22:21:09 -0600
commite4b55aa627bba56186b8df30cbd9f27177cfe1ad (patch)
treebd57d39d953fac6137f14ebf68835edd06a1fc75 /tests
parent474099ef1d4010fa918da698707b644cbc3fe5da (diff)
downloadayatana-indicator-messages-e4b55aa627bba56186b8df30cbd9f27177cfe1ad.tar.gz
ayatana-indicator-messages-e4b55aa627bba56186b8df30cbd9f27177cfe1ad.tar.bz2
ayatana-indicator-messages-e4b55aa627bba56186b8df30cbd9f27177cfe1ad.zip
Check the message's menu
Diffstat (limited to 'tests')
-rw-r--r--tests/indicator-test.cpp12
1 files changed, 10 insertions, 2 deletions
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<MessagingMenuMessage>(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<int>({0, 0, 0}), "x-canonical-type", "com.canonical.indicator.messages.messageitem");
+ EXPECT_MENU_ATTRIB(std::vector<int>({0, 0, 0}), "x-canonical-message-id", "testid");
+ EXPECT_MENU_ATTRIB(std::vector<int>({0, 0, 0}), "x-canonical-subtitle", "A subtitle too");
+ EXPECT_MENU_ATTRIB(std::vector<int>({0, 0, 0}), "x-canonical-text", "You only like me for my body");
}