From 81a534139c894e7398d71976b5489735aa6843c8 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 19 Aug 2019 16:21:32 +0200 Subject: [PATCH] chore(tests): fix tests --- src/Foundation.hs | 1 + src/Handler/Allocation/Register.hs | 2 ++ test/FoundationSpec.hs | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/src/Foundation.hs b/src/Foundation.hs index 68a223a94..a80f277d6 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -152,6 +152,7 @@ deriving instance Generic MaterialR deriving instance Generic TutorialR deriving instance Generic ExamR deriving instance Generic CourseApplicationR +deriving instance Generic AllocationR deriving instance Generic (Route UniWorX) -- | Convenient Type Synonyms: diff --git a/src/Handler/Allocation/Register.hs b/src/Handler/Allocation/Register.hs index 0c19a866d..9c2256695 100644 --- a/src/Handler/Allocation/Register.hs +++ b/src/Handler/Allocation/Register.hs @@ -12,6 +12,8 @@ import Utils.Lens import Handler.Utils.Form +{-# ANN module ("HLint: ignore Use newtype instead of data"::String) #-} + data AllocationRegisterForm = AllocationRegisterForm { arfTotalCourses :: Natural diff --git a/test/FoundationSpec.hs b/test/FoundationSpec.hs index cc562d816..d84e2ee7d 100644 --- a/test/FoundationSpec.hs +++ b/test/FoundationSpec.hs @@ -52,6 +52,10 @@ instance Arbitrary CourseApplicationR where arbitrary = genericArbitrary shrink = genericShrink +instance Arbitrary AllocationR where + arbitrary = genericArbitrary + shrink = genericShrink + instance Arbitrary (Route UniWorX) where arbitrary = genericArbitrary shrink = genericShrink