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
199
Issues
199
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
72e7b02d
Verified
Commit
72e7b02d
authored
Oct 07, 2025
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] add missing Test.Database.Operation.Types file
parent
64b1aef7
Pipeline
#7973
failed with stages
in 54 minutes and 8 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
Types.hs
test/Test/Database/Operations/Types.hs
+57
-0
No files found.
test/Test/Database/Operations/Types.hs
0 → 100644
View file @
72e7b02d
{-|
Module : Test.Database.Operations.Types
Description :
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
-}
module
Test.Database.Operations.Types
where
import
Data.Text
qualified
as
T
import
Gargantext.Core.Mail
(
EmailAddress
)
import
Gargantext.Core.Types.Individu
import
Gargantext.Prelude
import
Test.QuickCheck
testUsername'
::
Text
testUsername'
=
"alfredo"
testUsername
::
User
testUsername
=
UserName
testUsername'
testUser
::
EmailAddress
testUser
=
testUsername'
<>
"@well-typed.com"
testUserPassword
::
GargPassword
testUserPassword
=
GargPassword
"my_secret"
testCorpusName
::
Text
testCorpusName
=
"Text_Corpus"
data
ExpectedActual
a
=
Expected
a
|
Actual
a
deriving
Show
instance
Eq
a
=>
Eq
(
ExpectedActual
a
)
where
(
Expected
a
)
==
(
Actual
b
)
=
a
==
b
(
Actual
a
)
==
(
Expected
b
)
=
a
==
b
_
==
_
=
False
-- | Keeps a log of usernames we have already generated, so that our
-- roundtrip tests won't fail.
uniqueArbitraryNewUser
::
Int
->
Gen
(
NewUser
GargPassword
)
uniqueArbitraryNewUser
currentIx
=
do
ur
<-
(`
mappend
`
((
show
currentIx
::
Text
)
<>
"-"
))
<$>
ascii_txt
let
email
=
ur
<>
"@foo.com"
NewUser
<$>
pure
ur
<*>
pure
email
<*>
elements
arbitraryPassword
where
ascii_txt
::
Gen
T
.
Text
ascii_txt
=
fmap
(
T
.
pack
.
getPrintableString
)
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