bmc: delete if open sessions bails

Handle case where one tries to delete any blob while a blob is open.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I4407d46f7a87c42f7d2738668e72e58a847b60af
diff --git a/test/firmware_state_verificationcompleted_unittest.cpp b/test/firmware_state_verificationcompleted_unittest.cpp
index d9b4e70..ac3539d 100644
--- a/test/firmware_state_verificationcompleted_unittest.cpp
+++ b/test/firmware_state_verificationcompleted_unittest.cpp
@@ -47,7 +47,22 @@
 {
 };
 
-/* TODO: deleteBlob(blob) */
+/*
+ * deleteBlob(blob)
+ */
+TEST_F(FirmwareHandlerVerificationCompletedTest, DeleteBlobReturnsFalse)
+{
+    /* Try deleting all blobs, it doesn't really matter which though because you
+     * cannot close out an open session, therefore you must fail to delete
+     * anything unless everything is closed.
+     */
+    getToVerificationCompleted(ActionStatus::success);
+    auto blobs = handler->getBlobIds();
+    for (const auto& b : blobs)
+    {
+        EXPECT_FALSE(handler->deleteBlob(b));
+    }
+}
 
 /*
  * canHandleBlob