aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/indicator-test.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/indicator-test.cc b/tests/indicator-test.cc
index a21209c..40755e3 100644
--- a/tests/indicator-test.cc
+++ b/tests/indicator-test.cc
@@ -31,17 +31,26 @@ protected:
{
}
+ std::shared_ptr<AccountsServiceMock> as;
+
virtual void SetUp() override
{
//addMock(buildBustleMock("indicator-test-session.bustle", DBUS_TEST_SERVICE_BUS_SESSION));
//addMock(buildBustleMock("indicator-test-system.bustle", DBUS_TEST_SERVICE_BUS_SYSTEM));
- AccountsServiceMock as;
- addMock(as);
+ as = std::make_shared<AccountsServiceMock>();
+ addMock(*as);
IndicatorFixture::SetUp();
}
+ virtual void TearDown() override
+ {
+ as.reset();
+
+ IndicatorFixture::TearDown();
+ }
+
};
@@ -97,3 +106,4 @@ TEST_F(IndicatorTest, BaseActions) {
ASSERT_ACTION_EXISTS("volume");
ASSERT_ACTION_STATE_TYPE("volume", G_VARIANT_TYPE_DOUBLE);
}
+