Skip to content

Commit

Permalink
added test to open file with non-existing file id
Browse files Browse the repository at this point in the history
  • Loading branch information
PrajwolAmatya committed Sep 2, 2024
1 parent 3f4edcf commit 9a2a493
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/acceptance/features/apiCollaboration/wopi.feature
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,36 @@ Feature: collaboration (wopi)
| /app/open?file_id=<<FILEID>>&app_name=FakeOffice |
| /app/open?file_id=<<FILEID>> |


Scenario Outline: open file with non-existing file id
Given user "Alice" has uploaded file "filesForUpload/simple.odt" to "simple.odt"
And we save it into "FILEID"
And user "Alice" has deleted file "/simple.odt"
When user "Alice" sends HTTP method "POST" to URL "<app-endpoint>"
Then the HTTP status code should be "404"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"const": "RESOURCE_NOT_FOUND"
},
"message": {
"const": "file does not exist"
}
}
}
"""
Examples:
| app-endpoint |
| /app/open?file_id=<<FILEID>>&app_name=FakeOffice |
| /app/open?file_id=<<FILEID>> |

@issue-9495
Scenario Outline: open file with .odt extension (open-with-web)
Given user "Alice" has uploaded file "filesForUpload/simple.odt" to "simple.odt"
Expand Down

0 comments on commit 9a2a493

Please sign in to comment.