Use ndn::Buffer::data() instead of buf()

The latter is considered deprecated.

Change-Id: If92406ccedca391e3551b456491ebb47737f1bc1
diff --git a/tests/unit-tests/test-leaf.cpp b/tests/unit-tests/test-leaf.cpp
index 1588514..94ee50c 100644
--- a/tests/unit-tests/test-leaf.cpp
+++ b/tests/unit-tests/test-leaf.cpp
@@ -56,7 +56,7 @@
   BOOST_CHECK_NO_THROW(leaf.getDigest());
 
   ndn::ConstBufferPtr digest = leaf.getDigest();
-  BOOST_CHECK_EQUAL(result, ndn::toHex(digest->buf(), digest->size(), false));
+  BOOST_CHECK_EQUAL(result, ndn::toHex(digest->data(), digest->size(), false));
 }
 
 BOOST_AUTO_TEST_CASE(Container)