aboutsummaryrefslogtreecommitdiff
path: root/tests/indicator-test.cc
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-11-26 08:36:24 -0600
committerTed Gould <ted@gould.cx>2014-11-26 08:36:24 -0600
commit008b823ccc75dc3fe23a785a535243d3aea38009 (patch)
tree1d8d15c37abc3604f34d3673e17a8070e95bd9af /tests/indicator-test.cc
parent1188fa25abc4b23650888f8745837df8549b73af (diff)
downloadayatana-indicator-sound-008b823ccc75dc3fe23a785a535243d3aea38009.tar.gz
ayatana-indicator-sound-008b823ccc75dc3fe23a785a535243d3aea38009.tar.bz2
ayatana-indicator-sound-008b823ccc75dc3fe23a785a535243d3aea38009.zip
Make the account service accessible
Diffstat (limited to 'tests/indicator-test.cc')
-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);
}
+