test: firmware updateCompleted: getBlobIds()
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I1856669121eafa513e2f42be728a844fe6f042f9
diff --git a/test/firmware_state_updatecompleted_unittest.cpp b/test/firmware_state_updatecompleted_unittest.cpp
index 357458c..b86320b 100644
--- a/test/firmware_state_updatecompleted_unittest.cpp
+++ b/test/firmware_state_updatecompleted_unittest.cpp
@@ -21,6 +21,7 @@
{
using ::testing::IsEmpty;
+using ::testing::UnorderedElementsAreArray;
/*
* There are the following calls (parameters may vary):
@@ -188,9 +189,20 @@
}
/*
- * There are the following calls (parameters may vary):
- * canHandleBlob(blob)
* getBlobIds
+ * canHandleBlob(blob)
+ */
+TEST_F(FirmwareHandlerUpdateCompletedTest, GetBlobListProvidesExpectedBlobs)
+{
+ getToUpdateCompleted(ActionStatus::success);
+
+ std::vector<std::string> expected = {updateBlobId, hashBlobId,
+ activeImageBlobId, staticLayoutBlobId};
+ EXPECT_THAT(handler->getBlobIds(), UnorderedElementsAreArray(expected));
+}
+
+/*
+ * There are the following calls (parameters may vary):
* deleteBlob(blob)
* close(session)
*/