UUR6SMCAJMA7O3ZFUCQMPZFDDIPUVQ5IHUAC5F252YVD6H3JIKPQC
2XQD6KKKD6QVHFHAEMVE3XXY7X2T7BLTLL7XIILZAXNJJH2YONUQC
4U7F3CPIDTK6JSEDMNMHVKSR7HOQDLZQD2PPVMDLHO5SFSIMUXZAC
QMRKFEPGFBCEWAIXPEIG5ILKAJ2JH5L3TOITHR4HNJXK5FN3KXBQC
64C6AWH66FDKU6UE6Z6JPX2J2GBM2JOPTH2GL6LHKAIUBGNGDZ5AC
5DRIWGLUKMQZU2ZPBXSTLAWJKAMOD5YXAHM5LEDQHDFGYYLHWCDQC
7KZP4RHZ3QSYTPPQ257A65Z5UPX44TF2LAI2U5EMULQCLDCEUK2AC
NMWWP4ZNOKHZKSJ6F5KYEREWXXR5F4UD35WOKI3EH42AZWVCTCJAC
NVOCQVASZWTKQJG7GPH7KHKZZR7NUG4WLV5YY4KAIRPCJRWCZPIAC
EMVTF2IWNQGRL44FC4JNG5FYYQTZSFPNM6SOM7IAEH6T7PPK2NVAC
4SCFOJGNDAN4XZEAPWQQCBJ3CGZCJP3HUADRQLYZ2ITAKA7EJJTQC
KNSI575VAW6HRCZYXOEPQ4DTSML4EORML5MV4DJBRKE7TXCPS4EAC
{-# OPTIONS_GHC -Wwarn #-}
module Aftok.AuctionSpec (main, spec) where
import ClassyPrelude
import Aftok
import Aftok.Auction
import Aftok.Types
import Data.Hourglass
import Data.UUID
import Test.Hspec
import Test.QuickCheck
spec :: Spec
spec =
describe "bid ordering" $
it "ensures that bids with lowest seconds/btc ratio are first" $
let testB1 = Bid (UserId nil) (Seconds 60) (Satoshi 1000) undefined
testB2 = Bid (UserId nil) (Seconds 60) (Satoshi 100) undefined
testB3 = Bid (UserId nil) (Seconds 90) (Satoshi 100) undefined
in do
bidOrder testB1 testB2 `shouldBe` LT
bidOrder testB2 testB3 `shouldBe` LT
main :: IO ()
main = hspec spec