Fix expectations in keyvalue_completion

NAMED_REQUIRE_CALL returns a unique_ptr and vectors get destructed on
scope exit.

Change-Id: I7b2b20bcf6ba49492fce68a6b179a142d50c468c
diff --git a/tests/keyvalue_completion.cpp b/tests/keyvalue_completion.cpp
index b725dff2..3a1656d 100644
--- a/tests/keyvalue_completion.cpp
+++ b/tests/keyvalue_completion.cpp
@@ -38,7 +38,7 @@
     std::ostringstream errorStream;
 
     std::set<std::string> expected;
-    std::vector<std::shared_ptr<trompeloeil::expectation>> queryExpectations;
+    std::vector<std::unique_ptr<trompeloeil::expectation>> queryExpectations;
     std::vector<ListInstance> queryReturn;
 
     SECTION("get example:list[number=")
@@ -158,7 +158,4 @@
     }
 
     REQUIRE(parser.completeCommand(input, errorStream).m_completions == expected);
-    for (auto& it : queryExpectations) {
-        it.reset();
-    }
 }