From 89d4b4245d52776da850c4ef59e8bf51a8c60ada Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Wed, 4 Dec 2024 14:21:03 -0600 Subject: [PATCH] meta db unit tests and fixes --- repertory/repertory_test/src/meta_db_test.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/repertory/repertory_test/src/meta_db_test.cpp b/repertory/repertory_test/src/meta_db_test.cpp index 7397fd21..14d0bee3 100644 --- a/repertory/repertory_test/src/meta_db_test.cpp +++ b/repertory/repertory_test/src/meta_db_test.cpp @@ -82,4 +82,15 @@ TYPED_TEST(meta_db_test, this->meta_db->get_api_path(create_test_file(), api_path)); EXPECT_TRUE(api_path.empty()); } + +TYPED_TEST(meta_db_test, set_item_meta_fails_with_missing_directory_meta) { + auto test_file = create_test_file(); + auto test_source = create_test_file(); + EXPECT_EQ(api_error::error, this->meta_db->set_item_meta( + test_file, { + {META_SOURCE, test_source}, + })); + EXPECT_EQ(api_error::error, + this->meta_db->set_item_meta(test_file, META_SOURCE, test_source)); +} } // namespace repertory