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

parent c799819a
...@@ -96,20 +96,6 @@ $(deriveJSON (unPrefix "_hpr_") ''HyperdataPrivate) ...@@ -96,20 +96,6 @@ $(deriveJSON (unPrefix "_hpr_") ''HyperdataPrivate)
$(deriveJSON (unPrefix "_hpu_") ''HyperdataPublic) $(deriveJSON (unPrefix "_hpu_") ''HyperdataPublic)
$(deriveJSON (unPrefix "_hu_") ''HyperdataUser) $(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 -- | ToSchema instances
instance ToSchema HyperdataUser where instance ToSchema HyperdataUser where
......
...@@ -19,6 +19,7 @@ import Gargantext.API.Node.Corpus.New (ApiInfo(..)) ...@@ -19,6 +19,7 @@ import Gargantext.API.Node.Corpus.New (ApiInfo(..))
import Gargantext.API.Node.Types (RenameNode(..), WithQuery(..)) import Gargantext.API.Node.Types (RenameNode(..), WithQuery(..))
import Gargantext.Core.AsyncUpdates.CentralExchange.Types qualified as CET import Gargantext.Core.AsyncUpdates.CentralExchange.Types qualified as CET
import Gargantext.Core.AsyncUpdates.Dispatcher.Types qualified as DET import Gargantext.Core.AsyncUpdates.Dispatcher.Types qualified as DET
import Gargantext.Database.Admin.Types.Hyperdata qualified as Hyperdata
import Gargantext.Prelude import Gargantext.Prelude
import Servant.Job.Core qualified as SJ import Servant.Job.Core qualified as SJ
import Servant.Job.Types qualified as SJ import Servant.Job.Types qualified as SJ
...@@ -70,6 +71,22 @@ instance Arbitrary WithQuery where ...@@ -70,6 +71,22 @@ instance Arbitrary WithQuery where
pure $ WithQuery { .. } 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 -- Servant job
instance Arbitrary a => Arbitrary (SJ.JobOutput a) where instance Arbitrary a => Arbitrary (SJ.JobOutput a) where
arbitrary = SJ.JobOutput <$> arbitrary 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