test: firmware updateStarted: getBlobIds()
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I4f712e28d0bcbfcc1515ee704d3bd3e64b9d03b4
diff --git a/test/firmware_state_updatestarted_unittest.cpp b/test/firmware_state_updatestarted_unittest.cpp
index afea475..f661f88 100644
--- a/test/firmware_state_updatestarted_unittest.cpp
+++ b/test/firmware_state_updatestarted_unittest.cpp
@@ -19,6 +19,7 @@
{
using ::testing::Return;
+using ::testing::UnorderedElementsAreArray;
/*
* There are the following calls (parameters may vary):
@@ -57,6 +58,14 @@
/* canHandleBlob(blob)
* getBlobIds
*/
+TEST_F(FirmwareHandlerUpdateStartedTest, VerifyListOfBlobs)
+{
+ getToUpdateStarted();
+
+ std::vector<std::string> expected = {updateBlobId, hashBlobId,
+ activeImageBlobId, staticLayoutBlobId};
+ EXPECT_THAT(handler->getBlobIds(), UnorderedElementsAreArray(expected));
+}
/*
* TODO: deleteBlob(blob)