blob: b872b16fd0a90c6653c852a16749bf0f621ecc21 [file] [log] [blame]
Patrick Venture46637c82018-11-06 15:20:24 -08001#include "firmware_handler.hpp"
2
3#include <memory>
4
5#include <gtest/gtest.h>
6
7namespace blobs
8{
9TEST(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