From e81a274f8b330005401c52bc281f5efeee05e116 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 16 May 2018 08:13:26 +0200 Subject: Return stored node users decrypted as hash map instead of vector --- tests/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/main.cpp b/tests/main.cpp index e819684..3f9bbf9 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -221,11 +221,12 @@ int main() auto nodeUserData = database.getStoredUserNodeDataDecrypted(username, password); assertEquals((size_t)1, nodeUserData.size()); - if(nodeUserData[0].nodeHash != *databaseNode.getRequestHash()) + auto userDataIt = nodeUserData.find(*databaseNode.getRequestHash()); + if(userDataIt == nodeUserData.end()) fail("Expected stored node hash to match node hash"); - if(nodeUserData[0].keyPair.getPublicKey() != adminUserKey->getPublicKey()) + if(userDataIt->second.getPublicKey() != adminUserKey->getPublicKey()) fail("Expected stored public key to match admin user public key"); - if(nodeUserData[0].keyPair.getPrivateKey() != adminUserKey->getPrivateKey()) + if(userDataIt->second.getPrivateKey() != adminUserKey->getPrivateKey()) fail("Expected stored private key to match admin user private key"); try -- cgit v1.2.3