Permalink
Browse files

Move hSpec tests for 'lookupAAAA' into the (tested) docs for 'lookupA…

…AAA'.
  • Loading branch information...
1 parent db3f67e commit 6e4cfbbe6c5c496ccf701244730a88fabd9176a6 @orlitzky orlitzky committed Sep 12, 2013
Showing with 11 additions and 7 deletions.
  1. +11 −3 Network/DNS/Lookup.hs
  2. +0 −4 test2/LookupSpec.hs
View
@@ -97,9 +97,17 @@ lookupA rlv dom = do
unTag (RD_A x) = Right x
unTag _ = Left UnexpectedRDATA
-{-|
- Resolving 'IPv6' by 'AAAA'.
--}
+
+-- | Look up all (IPv6) \'AAAA\' records for the given hostname.
+--
+-- Examples:
+--
+-- >>> let hostname = Data.ByteString.Char8.pack "www.mew.org"
+-- >>>
+-- >>> rs <- makeResolvSeed defaultResolvConf
+-- >>> withResolver rs $ \resolver -> lookupAAAA resolver hostname
+-- Right [2001:240:11e:c00:00:00:00:101]
+--
lookupAAAA :: Resolver -> Domain -> IO (Either DNSError [IPv6])
lookupAAAA rlv dom = do
erds <- DNS.lookup rlv dom AAAA
View
@@ -19,10 +19,6 @@ spec = do
`shouldReturn`
Right []
- DNS.lookupAAAA resolver "www.mew.org"
- `shouldReturn`
- Right ["2001:240:11e:c00::101"]
-
describe "lookupNS" $ do
it "gets NS" $ do
rs <- makeResolvSeed defaultResolvConf

0 comments on commit 6e4cfbb

Please sign in to comment.