bmc: abort from updateStarted

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ib5cd094415af4e0c6b2bb3067fadef6b1a5af757
diff --git a/test/firmware_state_updatestarted_unittest.cpp b/test/firmware_state_updatestarted_unittest.cpp
index 420d7a7..51a3c20 100644
--- a/test/firmware_state_updatestarted_unittest.cpp
+++ b/test/firmware_state_updatestarted_unittest.cpp
@@ -212,8 +212,22 @@
 }
 
 /*
- * TODO: close(session) - this will abort.
+ * close(session) - this will abort.
  */
+TEST_F(FirmwareHandlerUpdateStartedTest, CloseOnUpdateDuringUpdateAbortsProcess)
+{
+    getToUpdateStarted();
+    EXPECT_CALL(*updateMockPtr, abort()).Times(1);
+
+    EXPECT_TRUE(handler->close(session));
+
+    std::vector<std::string> expectedBlobs = {staticLayoutBlobId, hashBlobId};
+
+    EXPECT_THAT(handler->getBlobIds(),
+                UnorderedElementsAreArray(expectedBlobs));
+
+    expectedState(FirmwareBlobHandler::UpdateState::notYetStarted);
+}
 
 } // namespace
 } // namespace ipmi_flash