Skip to content

Commit

Permalink
[#500] Trails: Rename one outdated case refering to parent rather the…
Browse files Browse the repository at this point in the history
…n previous.
  • Loading branch information
a-stacey committed Aug 21, 2019
1 parent c5d0bcb commit 52a8282
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions projects/trails/test/Mirza/Trails/Tests/Client.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 52a8282

Please sign in to comment.