Skip to content

Commit

Permalink
add test coverage for checking file versions after multiple restores (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan authored Jan 24, 2024
1 parent cf53146 commit c8818f5
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/acceptance/features/coreApiVersions/fileVersions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -418,3 +418,31 @@ Feature: dav-versions
When user "Brian" tries to get versions of file "textfile0.txt" from "Alice"
Then the HTTP status code should be "403"
And the value of the item "//s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\Forbidden"

@issue-enterprise-6249
Scenario: upload empty content file and check versions after multiple restores
Given user "Alice" has uploaded file with content "" to "textfile.txt"
And user "Alice" has uploaded file with content "test content" to "textfile.txt"
And the version folder of file "textfile.txt" for user "Alice" should contain "1" element
When user "Alice" restores version index "1" of file "textfile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "textfile.txt" for user "Alice" should be ""
And the version folder of file "textfile.txt" for user "Alice" should contain "1" elements
When user "Alice" restores version index "1" of file "textfile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "textfile.txt" for user "Alice" should be "test content"
And the version folder of file "textfile.txt" for user "Alice" should contain "1" elements


Scenario: update with empty content and check versions after multiple restores
Given user "Alice" has uploaded file with content "test content" to "textfile.txt"
And user "Alice" has uploaded file with content "" to "textfile.txt"
And the version folder of file "textfile.txt" for user "Alice" should contain "1" element
When user "Alice" restores version index "1" of file "textfile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "textfile.txt" for user "Alice" should be "test content"
And the version folder of file "textfile.txt" for user "Alice" should contain "1" elements
When user "Alice" restores version index "1" of file "textfile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "textfile.txt" for user "Alice" should be ""
And the version folder of file "textfile.txt" for user "Alice" should contain "1" elements

0 comments on commit c8818f5

Please sign in to comment.