Patrick Venture | 46637c8 | 2018-11-06 15:20:24 -0800 | [diff] [blame] | 1 | #include "firmware_handler.hpp" |
| 2 | |
| 3 | #include <memory> |
| 4 | |
| 5 | #include <gtest/gtest.h> |
| 6 | |
| 7 | namespace blobs |
| 8 | { |
| 9 | TEST(FirmwareHandlerStatTest, StatOnInactiveBlobIDReturnsTransport) |
| 10 | { |
| 11 | /* Test that the metadata information returned matches expectations for this |
| 12 | * case. |
| 13 | * |
| 14 | * canHandle has already been called at this point, so we don't need to test |
| 15 | * the input for this function. |
| 16 | */ |
| 17 | |
| 18 | auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler( |
| 19 | {"asdf"}, static_cast<uint16_t>(FirmwareUpdateFlags::bt)); |
| 20 | struct BlobMeta meta; |
| 21 | EXPECT_TRUE(handler->stat("asdf", &meta)); |
| 22 | EXPECT_EQ(static_cast<uint16_t>(FirmwareUpdateFlags::bt), meta.blobState); |
| 23 | } |
| 24 | |
| 25 | } // namespace blobs |