summaryrefslogtreecommitdiff
path: root/tests
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2016-01-24 15:35:49 +0100
committerAndrea Azzarone <azzaronea@gmail.com>2016-01-24 15:35:49 +0100
commit67f91ebd9e8b66c2690f2060b2f55a01d994f845 (patch)
tree5e434c7ccc111584c37b98141e5ff2edac949c1e /tests
parent08db65d0d50bc583d30131d358de98c42b92d233 (diff)
Make sure a volume can be formatted.
(bzr r4067.3.3)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_mock_devices.h1
-rw-r--r--tests/test_volume_launcher_icon.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_mock_devices.h b/tests/test_mock_devices.h
index e3bf66b4b..d429b569b 100644
--- a/tests/test_mock_devices.h
+++ b/tests/test_mock_devices.h
@@ -78,6 +78,7 @@ struct MockVolume : Volume
typedef std::shared_ptr<MockVolume> Ptr;
typedef testing::NiceMock<MockVolume> Nice;
+ MOCK_CONST_METHOD0(CanBeFormatted, bool(void));
MOCK_CONST_METHOD0(CanBeRemoved, bool(void));
MOCK_CONST_METHOD0(CanBeStopped, bool(void));
MOCK_CONST_METHOD0(GetName, std::string(void));
diff --git a/tests/test_volume_launcher_icon.cpp b/tests/test_volume_launcher_icon.cpp
index 269b31025..1bd4f5a56 100644
--- a/tests/test_volume_launcher_icon.cpp
+++ b/tests/test_volume_launcher_icon.cpp
@@ -56,6 +56,7 @@ struct TestVolumeLauncherIcon : public Test
void SetupVolumeDefaultBehavior()
{
+ ON_CALL(*volume_, CanBeFormatted()).WillByDefault(Return(false));
ON_CALL(*volume_, CanBeRemoved()).WillByDefault(Return(false));
ON_CALL(*volume_, CanBeStopped()).WillByDefault(Return(false));
ON_CALL(*volume_, GetName()).WillByDefault(Return("Test Name"));