test: consolidate blob lists

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Id0a8b64ccaacd787eef799d46d9523307fafb422
diff --git a/test/firmware_state_updatepending_unittest.cpp b/test/firmware_state_updatepending_unittest.cpp
index 884852c..d09c820 100644
--- a/test/firmware_state_updatepending_unittest.cpp
+++ b/test/firmware_state_updatepending_unittest.cpp
@@ -53,9 +53,9 @@
 {
     getToUpdatePending();
 
-    std::vector<std::string> expected = {updateBlobId, activeImageBlobId,
-                                         hashBlobId, staticLayoutBlobId};
-    EXPECT_THAT(handler->getBlobIds(), UnorderedElementsAreArray(expected));
+    EXPECT_THAT(handler->getBlobIds(),
+                UnorderedElementsAreArray({updateBlobId, activeImageBlobId,
+                                           hashBlobId, staticLayoutBlobId}));
 }
 
 /*
@@ -167,8 +167,7 @@
     expected.blobState = FirmwareBlobHandler::UpdateFlags::ipmi;
     expected.size = 0;
 
-    std::vector<std::string> testBlobs = {staticLayoutBlobId, hashBlobId};
-    for (const auto& blob : testBlobs)
+    for (const auto& blob : startingBlobs)
     {
         ASSERT_TRUE(handler->canHandleBlob(blob));
 
@@ -249,9 +248,8 @@
     ASSERT_TRUE(handler->canHandleBlob(updateBlobId));
     EXPECT_TRUE(handler->deleteBlob(updateBlobId));
 
-    std::vector<std::string> expectedBlobs = {staticLayoutBlobId, hashBlobId};
     EXPECT_THAT(handler->getBlobIds(),
-                UnorderedElementsAreArray(expectedBlobs));
+                UnorderedElementsAreArray(startingBlobs));
     expectedState(FirmwareBlobHandler::UpdateState::notYetStarted);
 }
 
@@ -264,9 +262,8 @@
     ASSERT_TRUE(handler->canHandleBlob(activeImageBlobId));
     EXPECT_TRUE(handler->deleteBlob(activeImageBlobId));
 
-    std::vector<std::string> expectedBlobs = {staticLayoutBlobId, hashBlobId};
     EXPECT_THAT(handler->getBlobIds(),
-                UnorderedElementsAreArray(expectedBlobs));
+                UnorderedElementsAreArray(startingBlobs));
     expectedState(FirmwareBlobHandler::UpdateState::notYetStarted);
 }
 
@@ -279,9 +276,8 @@
     ASSERT_TRUE(handler->canHandleBlob(staticLayoutBlobId));
     EXPECT_TRUE(handler->deleteBlob(staticLayoutBlobId));
 
-    std::vector<std::string> expectedBlobs = {staticLayoutBlobId, hashBlobId};
     EXPECT_THAT(handler->getBlobIds(),
-                UnorderedElementsAreArray(expectedBlobs));
+                UnorderedElementsAreArray(startingBlobs));
     expectedState(FirmwareBlobHandler::UpdateState::notYetStarted);
 }
 
@@ -294,9 +290,8 @@
     ASSERT_TRUE(handler->canHandleBlob(hashBlobId));
     EXPECT_TRUE(handler->deleteBlob(hashBlobId));
 
-    std::vector<std::string> expectedBlobs = {staticLayoutBlobId, hashBlobId};
     EXPECT_THAT(handler->getBlobIds(),
-                UnorderedElementsAreArray(expectedBlobs));
+                UnorderedElementsAreArray(startingBlobs));
     expectedState(FirmwareBlobHandler::UpdateState::notYetStarted);
 }