chore: fix tests
This commit is contained in:
parent
fc9f2e1607
commit
5739566248
@ -286,6 +286,13 @@ packages:
|
|||||||
sha256: 39b62f1f3f30c5a9e12f9c6a040d6863edb5ce81951452e649152a18145ee1bc
|
sha256: 39b62f1f3f30c5a9e12f9c6a040d6863edb5ce81951452e649152a18145ee1bc
|
||||||
original:
|
original:
|
||||||
hackage: hlibsass-0.1.10.1@sha256:08db56c633e9a83a642d8ea57dffa93112b092d05bf8f3b07491cfee9ee0dfa5,2565
|
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:
|
- completed:
|
||||||
hackage: hsass-0.8.0@sha256:05fb3d435dbdf9f66a98db4e1ee57a313170a677e52ab3a5a05ced1fc42b0834,2899
|
hackage: hsass-0.8.0@sha256:05fb3d435dbdf9f66a98db4e1ee57a313170a677e52ab3a5a05ced1fc42b0834,2899
|
||||||
pantry-tree:
|
pantry-tree:
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import Text.Blaze.Renderer.Text
|
|||||||
|
|
||||||
import qualified Data.Set as Set
|
import qualified Data.Set as Set
|
||||||
|
|
||||||
import qualified Net.IP as IP
|
import Network.IP.Addr
|
||||||
|
|
||||||
import Web.PathPieces
|
import Web.PathPieces
|
||||||
|
|
||||||
@ -201,8 +201,8 @@ instance Arbitrary LecturerType where
|
|||||||
|
|
||||||
instance Arbitrary IP where
|
instance Arbitrary IP where
|
||||||
arbitrary = oneof
|
arbitrary = oneof
|
||||||
[ IP.ipv4 <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
|
[ fmap IPv4 $ ip4FromOctets <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
|
||||||
, IP.ipv6 <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
|
, fmap IPv6 $ ip6FromWords <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
|
||||||
]
|
]
|
||||||
|
|
||||||
instance {-# OVERLAPPABLE #-} ToBackendKey SqlBackend record => Arbitrary (Key record) where
|
instance {-# OVERLAPPABLE #-} ToBackendKey SqlBackend record => Arbitrary (Key record) where
|
||||||
@ -355,7 +355,7 @@ spec = do
|
|||||||
lawsCheckHspec (Proxy @LecturerType)
|
lawsCheckHspec (Proxy @LecturerType)
|
||||||
[ eqLaws, ordLaws, showReadLaws, boundedEnumLaws, finiteLaws, jsonLaws, pathPieceLaws, persistFieldLaws ]
|
[ eqLaws, ordLaws, showReadLaws, boundedEnumLaws, finiteLaws, jsonLaws, pathPieceLaws, persistFieldLaws ]
|
||||||
lawsCheckHspec (Proxy @IP)
|
lawsCheckHspec (Proxy @IP)
|
||||||
[ eqLaws, ordLaws, showReadLaws, jsonLaws, persistFieldLaws ]
|
[ eqLaws, ordLaws, showReadLaws, persistFieldLaws ]
|
||||||
lawsCheckHspec (Proxy @ExamResultPoints)
|
lawsCheckHspec (Proxy @ExamResultPoints)
|
||||||
[ eqLaws, ordLaws, showReadLaws, jsonLaws, persistFieldLaws, csvFieldLaws ]
|
[ eqLaws, ordLaws, showReadLaws, jsonLaws, persistFieldLaws, csvFieldLaws ]
|
||||||
lawsCheckHspec (Proxy @ExamResultGrade)
|
lawsCheckHspec (Proxy @ExamResultGrade)
|
||||||
|
|||||||
@ -43,7 +43,7 @@ import Numeric.Natural as X
|
|||||||
|
|
||||||
import Control.Lens as X hiding ((<.), elements)
|
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 (truncateDb)
|
||||||
import Database as X (fillDb)
|
import Database as X (fillDb)
|
||||||
|
|||||||
Reference in New Issue
Block a user