diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-01-29 16:10:50 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-01-29 16:10:50 -0600 |
commit | 6b2c01ed6063bd7fd12e192668b738a075dc3a24 (patch) | |
tree | 423a2d2f6bc1ce45ced31ddc6cf69ea56a4ef98e /tests | |
parent | a64c84b920f3e6ea4b2872f3d709ceab3eb3b700 (diff) | |
download | ayatana-indicator-datetime-6b2c01ed6063bd7fd12e192668b738a075dc3a24.tar.gz ayatana-indicator-datetime-6b2c01ed6063bd7fd12e192668b738a075dc3a24.tar.bz2 ayatana-indicator-datetime-6b2c01ed6063bd7fd12e192668b738a075dc3a24.zip |
fix instant calendar toggle issue reported in testing by seb128; add a test for this regression
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-menus.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test-menus.cpp b/tests/test-menus.cpp index fe1e86e..27248ad 100644 --- a/tests/test-menus.cpp +++ b/tests/test-menus.cpp @@ -93,7 +93,8 @@ protected: { gchar* str = nullptr; const auto actions_expected = (profile == Menu::Desktop) || (profile == Menu::Phone); - const auto calendar_expected = (profile == Menu::Desktop) || (profile == Menu::DesktopGreeter); + const auto calendar_expected = ((profile == Menu::Desktop) || (profile == Menu::DesktopGreeter)) + && (m_state->settings->show_calendar.get()); // get the calendar section auto submenu = g_menu_model_get_item_link(menu_model, 0, G_MENU_LINK_SUBMENU); @@ -377,6 +378,11 @@ TEST_F(MenuFixture, Sections) TEST_F(MenuFixture, Calendar) { + m_state->settings->show_calendar.set(true); + for(auto& menu : m_menus) + InspectCalendar(menu->menu_model(), menu->profile()); + + m_state->settings->show_calendar.set(false); for(auto& menu : m_menus) InspectCalendar(menu->menu_model(), menu->profile()); } |