Fix getItems not returning correct leaf_data_ variant

Change-Id: I7d008606be7a6f874ecb2e7c22638ea04d4f7639
diff --git a/tests/setting_values.cpp b/tests/setting_values.cpp
index 9c04bf9..d15e2dc 100644
--- a/tests/setting_values.cpp
+++ b/tests/setting_values.cpp
@@ -213,5 +213,17 @@
         REQUIRE(datastore.getItems("/example-schema:*") == expected);
     }
 
+    SECTION("getItems returns correct datatypes")
+    {
+        {
+            REQUIRE_CALL(mock, write("/example-schema:leafEnum", "", "lol"));
+            datastore.setLeaf("/example-schema:leafEnum", enum_{"lol"});
+            datastore.commitChanges();
+        }
+        std::map<std::string, leaf_data_> expected{{"/example-schema:leafEnum", enum_{"lol"}}};
+
+        REQUIRE(datastore.getItems("/example-schema:leafEnum") == expected);
+    }
+
     waitForCompletionAndBitMore(seq1);
 }