-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2499 from LibreSign/backport/2498/stable28
[stable28] Cover passsword CRUD with integration tests
- Loading branch information
Showing
2 changed files
with
46 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Feature: account/signature | ||
Background: Create users | ||
Background: Create users and root certificate | ||
Given user "signer1" exists | ||
And set the email of user "signer1" to "[email protected]" | ||
And as user "admin" | ||
|
@@ -18,3 +18,41 @@ Feature: account/signature | |
And sending "post" to ocs "/apps/libresign/api/v1/account/signature" | ||
| signPassword | password | | ||
Then the response should have a status code 200 | ||
|
||
Scenario: Upload PFX file with error | ||
Given sending "post" to ocs "/apps/libresign/api/v1/account/pfx" | ||
Then the response should have a status code 400 | ||
And the response should be a JSON array with the following mandatory values | ||
| key | value | | ||
| message | No certificate file provided | | ||
|
||
Scenario: Change pfx password with success | ||
Given as user "signer1" | ||
And sending "post" to ocs "/apps/libresign/api/v1/account/signature" | ||
| signPassword | password | | ||
Then the response should have a status code 200 | ||
Given sending "patch" to ocs "/apps/libresign/api/v1/account/pfx" | ||
| current | password | | ||
| new | new | | ||
Then the response should have a status code 202 | ||
And the response should be a JSON array with the following mandatory values | ||
| key | value | | ||
| message | New password to sign documents has been created | | ||
Given sending "patch" to ocs "/apps/libresign/api/v1/account/pfx" | ||
| current | new | | ||
| new | anotherpassword | | ||
Then the response should have a status code 202 | ||
And the response should be a JSON array with the following mandatory values | ||
| key | value | | ||
| message | New password to sign documents has been created | | ||
|
||
Scenario: Delete pfx password with success | ||
Given as user "signer1" | ||
And sending "post" to ocs "/apps/libresign/api/v1/account/signature" | ||
| signPassword | password | | ||
Then the response should have a status code 200 | ||
Given sending "delete" to ocs "/apps/libresign/api/v1/account/pfx" | ||
Then the response should have a status code 202 | ||
And the response should be a JSON array with the following mandatory values | ||
| key | value | | ||
| message | Certificate file deleted with success. | |