-
-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
@api | ||
@debug | ||
Feature: | ||
In order to manage adherent mandates | ||
As a logged-in user | ||
I should be able to access adherent mandates API | ||
|
||
Scenario Outline: As a user granted with local scope, I can create an adherent zone based role | ||
Given I am logged with "<user>" via OAuth client "JeMengage Web" with scope "jemengage_admin" | ||
And I send a "POST" request to "/api/v3/zone_based_role?scope=<scope>" with body: | ||
""" | ||
{ | ||
"adherent": "d0a0935f-da7c-4caa-b582-a8c2376e5158", | ||
"type": "deputy", | ||
"zones": ["e3efe6fd-906e-11eb-a875-0242ac150002"] | ||
} | ||
""" | ||
Then the response status code should be 201 | ||
And the response should be in JSON | ||
And the JSON should be equal to: | ||
""" | ||
{ | ||
"type": "deputy", | ||
"adherent": { | ||
"uuid": "d0a0935f-da7c-4caa-b582-a8c2376e5158", | ||
"zones": [ | ||
{ | ||
"uuid": "@uuid@" | ||
} | ||
] | ||
}, | ||
"uuid": "@uuid@", | ||
"zones": [] | ||
} | ||
""" | ||
|
||
Examples: | ||
| user | scope | | ||
| referent@en-marche-dev.fr | president_departmental_assembly | | ||
| senateur@en-marche-dev.fr | delegated_08f40730-d807-4975-8773-69d8fae1da74 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters