bmc: verificationCompleted::close(success)
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I9c9b04f814827586428a31453693a53a6c00a473
diff --git a/test/firmware_state_verificationcompleted_unittest.cpp b/test/firmware_state_verificationcompleted_unittest.cpp
index 24ad9ad..e82a011 100644
--- a/test/firmware_state_verificationcompleted_unittest.cpp
+++ b/test/firmware_state_verificationcompleted_unittest.cpp
@@ -299,7 +299,21 @@
/*
* close(session) - close on the verify blobid:
* 1. if successful adds update blob id, changes state to UpdatePending
- * 2. if unsuccessful doesn't add update blob id, changes state to?
+ */
+TEST_F(FirmwareHandlerVerificationCompletedTest,
+ CloseAfterSuccessChangesStateAddsUpdateBlob)
+{
+ getToVerificationCompleted(VerifyCheckResponses::success);
+ ASSERT_FALSE(handler->canHandleBlob(updateBlobId));
+
+ handler->close(session);
+ EXPECT_TRUE(handler->canHandleBlob(updateBlobId));
+ expectedState(FirmwareBlobHandler::UpdateState::updatePending);
+}
+
+/*
+ * close(session) - close on the verify blobid:
+ * TODO: 2. if unsuccessful doesn't add update blob id, changes state to?
*/
} // namespace