test: firmware verificationPending: write
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I8ec81b967bcf4aa260a1d4238c544fe1b5facfb2
diff --git a/test/firmware_state_verificationpending_unittest.cpp b/test/firmware_state_verificationpending_unittest.cpp
index ba8360b..a99f8d9 100644
--- a/test/firmware_state_verificationpending_unittest.cpp
+++ b/test/firmware_state_verificationpending_unittest.cpp
@@ -234,6 +234,16 @@
/*
* write(session)
*/
+TEST_F(FirmwareHandlerVerificationPendingTest, WriteAgainstVerifyBlobIdFails)
+{
+ getToVerificationPending(staticLayoutBlobId);
+
+ EXPECT_TRUE(handler->open(session, flags, verifyBlobId));
+
+ std::vector<std::uint8_t> bytes = {0x01, 0x02};
+ EXPECT_FALSE(handler->write(session, 0, bytes));
+}
+
/*
* read(session)
*/