Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
backoffice_server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
backoffice_server
Commits
53eeac5c
Commit
53eeac5c
authored
1 year ago
by
Rémi PAILHAREY
Browse files
Options
Downloads
Patches
Plain Diff
fix: handle pdl starting with 0
parent
8f573ba4
No related branches found
No related tags found
2 merge requests
!80
MEP 2.5: fix 13 digits PDL
,
!79
fix: handle pdl starting with 0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
internal/models/consent.go
+1
-1
1 addition, 1 deletion
internal/models/consent.go
internal/rootmux/rootmux_test.go
+5
-5
5 additions, 5 deletions
internal/rootmux/rootmux_test.go
with
6 additions
and
6 deletions
internal/models/consent.go
+
1
−
1
View file @
53eeac5c
...
...
@@ -16,7 +16,7 @@ type Consent struct {
Firstname
string
`json:"firstname"`
Lastname
string
`json:"lastname"`
Address
string
`json:"address"`
PointID
int
`json:"pointID"`
PointID
string
`json:"pointID"`
PostalCode
string
`json:"postalCode"`
City
string
`json:"city"`
SafetyBoarding
bool
`json:"safetyOnBoarding"`
...
...
This diff is collapsed.
Click to expand it.
internal/rootmux/rootmux_test.go
+
5
−
5
View file @
53eeac5c
...
...
@@ -30,9 +30,9 @@ var (
partnersInfoStr
string
customPopupInfo
=
models
.
CustomPopup
{
ID
:
1
,
PopupEnabled
:
false
,
Title
:
"Alerte personnalisée"
,
Description
:
"Ecolyo 4ever"
}
customPopupStr
string
consent
=
models
.
Consent
{
Firstname
:
"Foo"
,
Lastname
:
"Bar"
,
PointID
:
123456
}
consent
=
models
.
Consent
{
Firstname
:
"Foo"
,
Lastname
:
"Bar"
,
PointID
:
"
123456
71234567"
}
consentStr
string
otherConsent
=
models
.
Consent
{
Firstname
:
"John"
,
Lastname
:
"Doe"
,
PointID
:
123
789
}
otherConsent
=
models
.
Consent
{
Firstname
:
"John"
,
Lastname
:
"Doe"
,
PointID
:
"0
123
4560123456"
}
otherConsentStr
string
noH
map
[
string
]
string
)
...
...
@@ -272,11 +272,11 @@ func sgeTests(t *testing.T) {
// Try to get first 50 consents (must pass)
do
(
"GET"
,
"/api/admin/consent?limit=50&page=0"
,
xsrfHeader
,
""
,
http
.
StatusOK
,
`{"totalRows":2,"rows":[{"ID":2`
)
// Try to search for both consent (must pass)
do
(
"GET"
,
"/api/admin/consent?search=123&limit=50&page=0"
,
xsrfHeader
,
""
,
http
.
StatusOK
,
`{"totalRows":2,"rows":[{"ID":2`
)
do
(
"GET"
,
"/api/admin/consent?search=123
456
&limit=50&page=0"
,
xsrfHeader
,
""
,
http
.
StatusOK
,
`{"totalRows":2,"rows":[{"ID":2`
)
// Try to search for first point id (must pass)
do
(
"GET"
,
"/api/admin/consent?search=123456&limit=50&page=0"
,
xsrfHeader
,
""
,
http
.
StatusOK
,
`{"totalRows":1,"rows":[{"ID":1`
)
do
(
"GET"
,
"/api/admin/consent?search=123456
71234567
&limit=50&page=0"
,
xsrfHeader
,
""
,
http
.
StatusOK
,
`{"totalRows":1,"rows":[{"ID":1`
)
// Try to search for second point id (must pass)
do
(
"GET"
,
"/api/admin/consent?search=123
789
&limit=50&page=0"
,
xsrfHeader
,
""
,
http
.
StatusOK
,
`{"totalRows":1,"rows":[{"ID":2`
)
do
(
"GET"
,
"/api/admin/consent?search=
0
123
4560123456
&limit=50&page=0"
,
xsrfHeader
,
""
,
http
.
StatusOK
,
`{"totalRows":1,"rows":[{"ID":2`
)
// Try to search for unknown point id (must pass empty)
do
(
"GET"
,
"/api/admin/consent?search=000000&limit=50&page=0"
,
xsrfHeader
,
""
,
http
.
StatusOK
,
`{"totalRows":0,"rows":[]`
)
// Try to delete a consent (must pass)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment