summaryrefslogtreecommitdiff
path: root/tests/tests.hs
blob: 60ab08e1db9a398a4cafe2bd43eb43aea855564d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import Network.Gravatar

main = do
    print $ gravatar "dons@galois.com" == "http://www.gravatar.com/avatar.php?gravatar_id=f21827076a1d0725c4f4bd5a640102e9"

    print $ (gravatarWith "dons@galois.com" (Just R) Nothing (Just "http://haskell.org") ) == "http://www.gravatar.com/avatar.php?gravatar_id=f21827076a1d0725c4f4bd5a640102e9&rating=R&default=http%3A%2F%2Fhaskell.org"

    print $ (gravatarWith "dons@galois.com" (Just R) (size 20) (Just "http://haskell.org") ) == "http://www.gravatar.com/avatar.php?gravatar_id=f21827076a1d0725c4f4bd5a640102e9&rating=R&size=20&default=http%3A%2F%2Fhaskell.org"

    -- illegal size
    print $ (gravatarWith "dons@galois.com" (Just R) (size 200) (Just "http://haskell.org") ) == "http://www.gravatar.com/avatar.php?gravatar_id=f21827076a1d0725c4f4bd5a640102e9&rating=R&default=http%3A%2F%2Fhaskell.org"