[tests] move Arbitrary Hyperdata.User instance to Test.Instances

parent c799819a
Pipeline #6480 passed with stages
in 42 minutes and 58 seconds
......@@ -96,20 +96,6 @@ $(deriveJSON (unPrefix "_hpr_") ''HyperdataPrivate)
$(deriveJSON (unPrefix "_hpu_") ''HyperdataPublic)
$(deriveJSON (unPrefix "_hu_") ''HyperdataUser)
-- | Arbitrary instances
instance Arbitrary HyperdataUser where
arbitrary = HyperdataUser <$> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
instance Arbitrary HyperdataPrivate where
arbitrary = pure defaultHyperdataPrivate
instance Arbitrary HyperdataPublic where
arbitrary = pure defaultHyperdataPublic
-- | ToSchema instances
instance ToSchema HyperdataUser where
......
......@@ -19,6 +19,7 @@ import Gargantext.API.Node.Corpus.New (ApiInfo(..))
import Gargantext.API.Node.Types (RenameNode(..), WithQuery(..))
import Gargantext.Core.AsyncUpdates.CentralExchange.Types qualified as CET
import Gargantext.Core.AsyncUpdates.Dispatcher.Types qualified as DET
import Gargantext.Database.Admin.Types.Hyperdata qualified as Hyperdata
import Gargantext.Prelude
import Servant.Job.Core qualified as SJ
import Servant.Job.Types qualified as SJ
......@@ -70,6 +71,22 @@ instance Arbitrary WithQuery where
pure $ WithQuery { .. }
-- Hyperdata
instance Arbitrary Hyperdata.HyperdataUser where
arbitrary = Hyperdata.HyperdataUser <$> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
<*> arbitrary
instance Arbitrary Hyperdata.HyperdataPrivate where
arbitrary = pure Hyperdata.defaultHyperdataPrivate
instance Arbitrary Hyperdata.HyperdataPublic where
arbitrary = pure Hyperdata.defaultHyperdataPublic
-- Servant job
instance Arbitrary a => Arbitrary (SJ.JobOutput a) where
arbitrary = SJ.JobOutput <$> arbitrary
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment