Fix NetconfAccess not treating bools as bools

Change-Id: I024040efe78dd46e1fd89bd8e22f4942e80c7854
diff --git a/tests/sysrepo.cpp b/tests/sysrepo.cpp
index c544cf3..7125a9a 100644
--- a/tests/sysrepo.cpp
+++ b/tests/sysrepo.cpp
@@ -17,13 +17,27 @@
 #error "Unknown backend"
 #endif
 #include "sysrepo_subscription.hpp"
+#include "utils.hpp"
 
 class MockRecorder : public Recorder {
 public:
     MAKE_MOCK3(write, void(const std::string&, const std::string&, const std::string&), override);
 };
 
-TEST_CASE("setting values")
+namespace std {
+std::ostream& operator<<(std::ostream& s, const std::map<std::string, leaf_data_> map)
+{
+    s << std::endl
+      << "{";
+    for (const auto& it : map) {
+        s << "{\"" << it.first << "\", " << leafDataToString(it.second) << "}" << std::endl;
+    }
+    s << "}" << std::endl;
+    return s;
+}
+}
+
+TEST_CASE("setting/getting values")
 {
     trompeloeil::sequence seq1;
     MockRecorder mock;
@@ -161,6 +175,17 @@
             datastore.commitChanges();
         }
     }
+    SECTION("bool values get correctly represented as bools")
+    {
+        {
+            REQUIRE_CALL(mock, write("/example-schema:down", "", "true"));
+            datastore.setLeaf("/example-schema:down", bool{true});
+            datastore.commitChanges();
+        }
+
+        std::map<std::string, leaf_data_> expected{{"/example-schema:down", bool{true}}};
+        REQUIRE(datastore.getItems("/example-schema:down") == expected);
+    }
 
     waitForCompletionAndBitMore(seq1);
 }