mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-09-11 17:57:44 +00:00
next iteration fixes
This commit is contained in:
@@ -106,7 +106,7 @@ mapAvailability NameStatusResp {nsStatus, nsExpires, nsGraceEnds, nsAuctionEnds,
|
||||
"expired" -> Right NAVailable
|
||||
"grace" -> Right $ maybe lapsed NAInGrace nsGraceEnds
|
||||
"auction" -> Right $ fromMaybe lapsed (NAAuction <$> nsPremium <*> nsAuctionEnds)
|
||||
"reserved" -> Right $ NAReserved (maybe NRUnspecified mapReason nsReasonCode)
|
||||
"reserved" -> Right $ NAReserved (maybe NRUnknown mapReason nsReasonCode)
|
||||
"registered" -> Right $ NATaken nsExpires
|
||||
-- registered, but its records point nowhere
|
||||
"noResolver" -> Right $ NATaken nsExpires
|
||||
|
||||
@@ -118,8 +118,9 @@ availabilitySpec = do
|
||||
(NAAuction "99999952316384526016153087" 1798191621)
|
||||
it "a reserved name says why it is held back" $
|
||||
answers status404 "{\"error\":\"reserved\",\"reasonCode\":\"trademark\"}" (NAReserved NRTrademark)
|
||||
-- an older resolver sends no reasonCode; that is not the chain saying "none"
|
||||
it "a reserved name with no reasonCode at all is still reserved" $
|
||||
answers status404 "{\"error\":\"reserved\"}" (NAReserved NRUnspecified)
|
||||
answers status404 "{\"error\":\"reserved\"}" (NAReserved NRUnknown)
|
||||
-- a later version may name reasons this one cannot; the reservation must
|
||||
-- survive that, or a client would offer a name it cannot register
|
||||
it "a reason from a later version still reads as reserved" $
|
||||
|
||||
Reference in New Issue
Block a user