From 5e8af0a9bd3832607284a588de46d15f09b6893e Mon Sep 17 00:00:00 2001 From: shum Date: Thu, 22 Oct 2026 05:06:19 +0000 Subject: [PATCH] store: test the reveal's commitment check alone --- tests/Bots/StoreService/NamesRevealTests.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/Bots/StoreService/NamesRevealTests.hs b/tests/Bots/StoreService/NamesRevealTests.hs index a09a275cae..340a6aecd4 100644 --- a/tests/Bots/StoreService/NamesRevealTests.hs +++ b/tests/Bots/StoreService/NamesRevealTests.hs @@ -369,13 +369,12 @@ testCommitmentRefusals = withReveals $ \Fx {fCtx = ctx} -> do unwritten <$> stored ctx rid `shouldReturn` unchanged ownerReveal ctx rid alice `shouldReturn` accepted --- | The page signs and commits one duration, the order states another; the service rebuilds with the order's. +-- | The commitment is of another duration than the order states; the intent, of the order's, passes on its own. testWrongDuration :: IO () testWrongDuration = withReveals $ \Fx {fCtx = ctx} -> do - let longer = alice {rDuration = rDuration alice + 1} - rid <- committed ctx (orderOf longer) + rid <- committed ctx (orderOf alice {rDuration = rDuration alice + 1}) nrDuration <$> stored ctx rid `shouldReturn` rDuration alice - ownerReveal ctx rid longer `shouldReturn` badRequest + ownerReveal ctx rid alice `shouldReturn` badRequest nrReveal <$> stored ctx rid `shouldReturn` Nothing testSecondLink :: IO ()