aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/manual-test-snap.cpp4
-rw-r--r--tests/notification-fixture.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/manual-test-snap.cpp b/tests/manual-test-snap.cpp
index 02cbb9f..72fd374 100644
--- a/tests/manual-test-snap.cpp
+++ b/tests/manual-test-snap.cpp
@@ -95,10 +95,12 @@ int main(int argc, const char* argv[])
auto notification_engine = std::make_shared<ain::Engine>("ayatana-indicator-datetime-service");
auto sound_builder = std::make_shared<ain::DefaultSoundBuilder>();
- Snap snap (notification_engine, settings);
+ auto system_bus = g_bus_get_sync(G_BUS_TYPE_SYSTEM, nullptr, nullptr);
+ Snap snap (notification_engine, sound_builder, settings, system_bus);
snap(a, a.alarms.front(), on_response);
g_main_loop_run(loop);
g_main_loop_unref(loop);
+ g_clear_object(&system_bus);
return 0;
}
diff --git a/tests/notification-fixture.h b/tests/notification-fixture.h
index 0c24843..cbce9ff 100644
--- a/tests/notification-fixture.h
+++ b/tests/notification-fixture.h
@@ -334,7 +334,7 @@ protected:
const std::shared_ptr<ayatana::indicator::notifications::SoundBuilder>& sb,
const std::shared_ptr<ayatana::indicator::datetime::Settings>& settings)
{
- auto snap = std::make_shared<ayatana::indicator::datetime::Snap>(ne, sb, settings);
+ auto snap = std::make_shared<ayatana::indicator::datetime::Snap>(ne, sb, settings, system_bus);
wait_msec(100); // wait a moment for the Snap to finish its async dbus bootstrapping
return snap;
}