aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_factory.cpp')
-rw-r--r--test/unit/test_factory.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp
index 739bb729..20869d91 100644
--- a/test/unit/test_factory.cpp
+++ b/test/unit/test_factory.cpp
@@ -2729,4 +2729,14 @@ TEST(factory, createObjectsFromName) {
factory->createObjectsFromName("i_dont_exist", types, false, 1);
}
+// ---------------------------------------------------------------------------
+
+TEST(factory, getMetadata) {
+ auto ctxt = DatabaseContext::create();
+ EXPECT_EQ(ctxt->getMetadata("i_do_not_exist"), nullptr);
+ const char *IGNF_VERSION = ctxt->getMetadata("IGNF.VERSION");
+ ASSERT_TRUE(IGNF_VERSION != nullptr);
+ EXPECT_EQ(std::string(IGNF_VERSION), "3.0.2");
+}
+
} // namespace