Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christian Merten
haskell-gargantext
Commits
68a2d7de
Verified
Commit
68a2d7de
authored
Jul 30, 2024
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tests] move Arbitrary Hyperdata.User instance to Test.Instances
parent
c799819a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
User.hs
src/Gargantext/Database/Admin/Types/Hyperdata/User.hs
+0
-14
Instances.hs
test/Test/Instances.hs
+17
-0
No files found.
src/Gargantext/Database/Admin/Types/Hyperdata/User.hs
View file @
68a2d7de
...
@@ -96,20 +96,6 @@ $(deriveJSON (unPrefix "_hpr_") ''HyperdataPrivate)
...
@@ -96,20 +96,6 @@ $(deriveJSON (unPrefix "_hpr_") ''HyperdataPrivate)
$
(
deriveJSON
(
unPrefix
"_hpu_"
)
''
H
yperdataPublic
)
$
(
deriveJSON
(
unPrefix
"_hpu_"
)
''
H
yperdataPublic
)
$
(
deriveJSON
(
unPrefix
"_hu_"
)
''
H
yperdataUser
)
$
(
deriveJSON
(
unPrefix
"_hu_"
)
''
H
yperdataUser
)
-- | 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
...
...
test/Test/Instances.hs
View file @
68a2d7de
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment