From 52a8282c812812aac5eadc42c58f513340e88038 Mon Sep 17 00:00:00 2001 From: Ashley Stacey Date: Wed, 21 Aug 2019 16:57:24 +1000 Subject: [PATCH] [#500] Trails: Rename one outdated case refering to parent rather then previous. --- projects/trails/test/Mirza/Trails/Tests/Client.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/projects/trails/test/Mirza/Trails/Tests/Client.hs b/projects/trails/test/Mirza/Trails/Tests/Client.hs index 681f3aae..f3afbe2e 100644 --- a/projects/trails/test/Mirza/Trails/Tests/Client.hs +++ b/projects/trails/test/Mirza/Trails/Tests/Client.hs @@ -344,13 +344,13 @@ clientSpec = do getMultiPhaseEntryBySignatureResult `shouldMatchTrail` [multiPhaseAddFirst, multiPhaseAddSecond] step "That adding an entry with the previous signatures not in the trail, and not already stored by the service fails" - noParentParent <- buildEntry - noParentEntry <- joinEntry (trailEntrySignature noParentParent) <$> buildEntry - verifyValidTrailTestIntegrityCheck [noParentEntry] - noParentAddResult <- http $ addTrail [noParentEntry] - noParentAddResult `shouldSatisfy` isLeft - noParentAddResult `shouldSatisfy` (checkFailureStatus NS.badRequest400) - noParentAddResult `shouldSatisfy` (checkFailureMessage "It is not possible to add entries with previous signatures that are not present in the current trail or already stored by the service.") + noPreviousPrevious <- buildEntry + noPreviousEntry <- joinEntry (trailEntrySignature noPreviousPrevious) <$> buildEntry + verifyValidTrailTestIntegrityCheck [noPreviousEntry] + noPreviousAddResult <- http $ addTrail [noPreviousEntry] + noPreviousAddResult `shouldSatisfy` isLeft + noPreviousAddResult `shouldSatisfy` (checkFailureStatus NS.badRequest400) + noPreviousAddResult `shouldSatisfy` (checkFailureMessage "It is not possible to add entries with previous signatures that are not present in the current trail or already stored by the service.") -- TODO: Test that invalid signature fails. -- TODO: Test that timestamp in the future is invalid.