From 57395662483e24d0dbed9d8b7b555ccc0c92d97b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 17 Aug 2020 20:58:46 +0200 Subject: [PATCH] chore: fix tests --- stack.yaml.lock | 7 +++++++ test/Model/TypesSpec.hs | 8 ++++---- test/TestImport.hs | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/stack.yaml.lock b/stack.yaml.lock index 7d4ed7b5d..31fac9026 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -286,6 +286,13 @@ packages: sha256: 39b62f1f3f30c5a9e12f9c6a040d6863edb5ce81951452e649152a18145ee1bc original: hackage: hlibsass-0.1.10.1@sha256:08db56c633e9a83a642d8ea57dffa93112b092d05bf8f3b07491cfee9ee0dfa5,2565 +- completed: + hackage: hlint-test-0.1.0.0@sha256:e427c0593433205fc629fb05b74c6b1deb1de72d1571f26142de008f0d5ee7a9,1814 + pantry-tree: + size: 442 + sha256: 347eac6c8a3c02fc0101444d6526b57b3c27785809149b12f90d8db57c721fea + original: + hackage: hlint-test-0.1.0.0@sha256:e427c0593433205fc629fb05b74c6b1deb1de72d1571f26142de008f0d5ee7a9,1814 - completed: hackage: hsass-0.8.0@sha256:05fb3d435dbdf9f66a98db4e1ee57a313170a677e52ab3a5a05ced1fc42b0834,2899 pantry-tree: diff --git a/test/Model/TypesSpec.hs b/test/Model/TypesSpec.hs index d8d1cf5a4..9606efd6b 100644 --- a/test/Model/TypesSpec.hs +++ b/test/Model/TypesSpec.hs @@ -22,7 +22,7 @@ import Text.Blaze.Renderer.Text import qualified Data.Set as Set -import qualified Net.IP as IP +import Network.IP.Addr import Web.PathPieces @@ -201,8 +201,8 @@ instance Arbitrary LecturerType where instance Arbitrary IP where arbitrary = oneof - [ IP.ipv4 <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary - , IP.ipv6 <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary + [ fmap IPv4 $ ip4FromOctets <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary + , fmap IPv6 $ ip6FromWords <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary ] instance {-# OVERLAPPABLE #-} ToBackendKey SqlBackend record => Arbitrary (Key record) where @@ -355,7 +355,7 @@ spec = do lawsCheckHspec (Proxy @LecturerType) [ eqLaws, ordLaws, showReadLaws, boundedEnumLaws, finiteLaws, jsonLaws, pathPieceLaws, persistFieldLaws ] lawsCheckHspec (Proxy @IP) - [ eqLaws, ordLaws, showReadLaws, jsonLaws, persistFieldLaws ] + [ eqLaws, ordLaws, showReadLaws, persistFieldLaws ] lawsCheckHspec (Proxy @ExamResultPoints) [ eqLaws, ordLaws, showReadLaws, jsonLaws, persistFieldLaws, csvFieldLaws ] lawsCheckHspec (Proxy @ExamResultGrade) diff --git a/test/TestImport.hs b/test/TestImport.hs index f2832a9ac..d4cc61787 100644 --- a/test/TestImport.hs +++ b/test/TestImport.hs @@ -43,7 +43,7 @@ import Numeric.Natural as X import Control.Lens as X hiding ((<.), elements) -import Net.IP as X (IP) +import Network.IP.Addr as X (IP) import Database (truncateDb) import Database as X (fillDb)