bmc: firmware updatePending: getBlobIds

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I64f42635dc213a25e4a1bbac3946f6fe8e1545fa
diff --git a/firmware_handler.cpp b/firmware_handler.cpp
index 413c54d..3a109de 100644
--- a/firmware_handler.cpp
+++ b/firmware_handler.cpp
@@ -604,6 +604,7 @@
                 {
                     state = UpdateState::updatePending;
                     addBlobId(updateBlobId);
+                    removeBlobId(verifyBlobId);
                 }
                 else
                 {
diff --git a/test/firmware_state_updatepending_unittest.cpp b/test/firmware_state_updatepending_unittest.cpp
index 3c2bc3e..646cef0 100644
--- a/test/firmware_state_updatepending_unittest.cpp
+++ b/test/firmware_state_updatepending_unittest.cpp
@@ -19,6 +19,7 @@
 {
 
 using ::testing::Return;
+using ::testing::UnorderedElementsAreArray;
 
 /*
  * There are the following calls (parameters may vary):
@@ -81,6 +82,15 @@
  * canHandleBlob(blob)
  * getBlobIds
  */
+TEST_F(FirmwareHandlerUpdatePendingTest, GetBlobsListHasExpectedValues)
+{
+    getToUpdatePending();
+
+    std::vector<std::string> expected = {updateBlobId, activeImageBlobId,
+                                         hashBlobId, staticLayoutBlobId};
+    EXPECT_THAT(handler->getBlobIds(), UnorderedElementsAreArray(expected));
+}
+
 /*
  * deleteBlob(blob)
  */