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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
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
gargantext
haskell-gargantext
Commits
68a2d7de
Verified
Commit
68a2d7de
authored
Jul 30, 2024
by
Przemyslaw Kaminski
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tests] move Arbitrary Hyperdata.User instance to Test.Instances
parent
c799819a
Pipeline
#6480
passed with stages
in 42 minutes and 58 seconds
Changes
2
Pipelines
1
Hide 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)
$
(
deriveJSON
(
unPrefix
"_hpu_"
)
''
H
yperdataPublic
)
$
(
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
instance
ToSchema
HyperdataUser
where
...
...
test/Test/Instances.hs
View file @
68a2d7de
...
...
@@ -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
...
...
Przemyslaw Kaminski
@cgenie
mentioned in commit
5660aec0
·
Oct 08, 2024
mentioned in commit
5660aec0
mentioned in commit 5660aec07ec5a0a0a5468f440092c1a8f57a864e
Toggle commit list
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