Skip to content

Commit

Permalink
Errors fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jasson99 committed Mar 5, 2020
1 parent eb76b1b commit 25f5eef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 41 deletions.
41 changes: 1 addition & 40 deletions tests/acceptance/features/apiTranslation/translation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: translate messages in api response to preferred language
I want response messages to be translated in preferred language
So that I can see and understand the response messages in my language

Scenario Outline: user tries to get non existing share and uses language "deutsch"
Scenario Outline: user tries to get non existing share and uses some preferred language
Given user "user0" has been created with default attributes and without skeleton files
And these users have been created with default attributes and skeleton files:
| username |
Expand All @@ -15,51 +15,12 @@ Feature: translate messages in api response to preferred language
When user "user0" gets the info of the last share in language "de-DE" using the sharing API
Then the OCS status code should be "404"
And the OCS status message should be "Fehlerhafte Freigabe-ID, Freigabe existiert nicht"
Examples:
| dav_version |
| old |
| new |

Scenario Outline: user tries to get non existing share and uses language "chinese"
Given user "user0" has been created with default attributes and without skeleton files
And these users have been created with default attributes and skeleton files:
| username |
| user1 |
| user2 |
And using <dav_version> DAV path
And user "user1" has shared file "textfile0.txt" with user "user2"
When user "user0" gets the info of the last share in language "zh-CN" using the sharing API
Then the OCS status code should be "404"
And the OCS status message should be "错误的共享 ID,共享不存在"
Examples:
| dav_version |
| old |
| new |

Scenario Outline: user tries to get non existing share and uses language "french"
Given user "user0" has been created with default attributes and without skeleton files
And these users have been created with default attributes and skeleton files:
| username |
| user1 |
| user2 |
And using <dav_version> DAV path
And user "user1" has shared file "textfile0.txt" with user "user2"
When user "user0" gets the info of the last share in language "fr-FR" using the sharing API
Then the OCS status code should be "404"
And the OCS status message should be "Mauvais ID de partage, le partage n'existe pas"
Examples:
| dav_version |
| old |
| new |

Scenario Outline: user tries to get non existing share and uses language "spanish"
Given user "user0" has been created with default attributes and without skeleton files
And these users have been created with default attributes and skeleton files:
| username |
| user1 |
| user2 |
And using <dav_version> DAV path
And user "user1" has shared file "textfile0.txt" with user "user2"
When user "user0" gets the info of the last share in language "es-ES" using the sharing API
Then the OCS status code should be "404"
And the OCS status message should be "El ID del recurso compartido no es correcto, el recurso compartido no existe"
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/bootstrap/Sharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,7 @@ public function extractLastSharedIdFromLastResponse() {
*
* @return void
*/
public function getShareData($user, $share_id, $language) {
public function getShareData($user, $share_id, $language=null) {
$url = $this->getSharesEndpointPath("/$share_id");
$headers = [];
if ($language !== null) {
Expand Down

0 comments on commit 25f5eef

Please sign in to comment.