Increase coverage of GetNoteDecryptor()

This commit is contained in:
Jack Grigg 2016-09-01 14:44:01 +12:00
parent 5abaca1af6
commit 73db0c12b9
1 changed files with 4 additions and 2 deletions

View File

@ -34,8 +34,10 @@ TEST(keystore_tests, store_and_retrieve_note_decryptor) {
auto sk = libzcash::SpendingKey::random();
auto addr = sk.address();
keyStore.AddSpendingKey(sk);
keyStore.GetNoteDecryptor(addr, decOut);
EXPECT_FALSE(keyStore.GetNoteDecryptor(addr, decOut));
keyStore.AddSpendingKey(sk);
EXPECT_TRUE(keyStore.GetNoteDecryptor(addr, decOut));
EXPECT_EQ(ZCNoteDecryption(sk.viewing_key()), decOut);
}