Fix regression of repo not registering prefixes for previously inserted data

Change-Id: I90e47def6219560cdadd281b8f65b16036aa0801
Refs: #4247
diff --git a/tests/unit/repo-storage.cpp b/tests/unit/repo-storage.cpp
index 0458c23..4f89d6b 100644
--- a/tests/unit/repo-storage.cpp
+++ b/tests/unit/repo-storage.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2018, Regents of the University of California.
+/*
+ * Copyright (c) 2014-2019, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -64,6 +64,24 @@
   }
 }
 
+BOOST_FIXTURE_TEST_CASE(NotifyAboutExistingData, Fixture<BasicDataset>)
+{
+  // Insert data into repo
+  for (const auto& d : this->data) {
+    handle->insertData(*d);
+  }
+
+  std::vector<Name> names;
+  handle->afterDataInsertion.connect([&] (const Name& name) {
+      names.push_back(name);
+      BOOST_TEST_MESSAGE("Got notification about " << name);
+    });
+
+  handle->notifyAboutExistingData();
+
+  BOOST_CHECK_EQUAL(names.size(), this->data.size());
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace tests