Skip to content

Commit

Permalink
Merge pull request nextcloud#630 from nextcloud/enoch85-patch-1
Browse files Browse the repository at this point in the history
ownCloud -> Nextcloud
  • Loading branch information
rullzer authored Jul 29, 2016
2 parents 8a27e32 + 768c4aa commit 1eebea3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 23 deletions.
7 changes: 3 additions & 4 deletions build/integration/features/bootstrap/BasicStructure.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,19 +300,19 @@ public function modifyTextOfFile($user, $filename, $text) {
*/
public static function addFilesToSkeleton(){
for ($i=0; $i<5; $i++){
file_put_contents("../../core/skeleton/" . "textfile" . "$i" . ".txt", "ownCloud test text file\n");
file_put_contents("../../core/skeleton/" . "textfile" . "$i" . ".txt", "Nextcloud test text file\n");
}
if (!file_exists("../../core/skeleton/FOLDER")) {
mkdir("../../core/skeleton/FOLDER", 0777, true);
}
if (!file_exists("../../core/skeleton/PARENT")) {
mkdir("../../core/skeleton/PARENT", 0777, true);
}
file_put_contents("../../core/skeleton/PARENT/" . "parent.txt", "ownCloud test text file\n");
file_put_contents("../../core/skeleton/PARENT/" . "parent.txt", "Nextcloud test text file\n");
if (!file_exists("../../core/skeleton/PARENT/CHILD")) {
mkdir("../../core/skeleton/PARENT/CHILD", 0777, true);
}
file_put_contents("../../core/skeleton/PARENT/CHILD/" . "child.txt", "ownCloud test text file\n");
file_put_contents("../../core/skeleton/PARENT/CHILD/" . "child.txt", "Nextcloud test text file\n");
}

/**
Expand All @@ -335,4 +335,3 @@ public static function removeFilesFromSkeleton(){
}
}
}

8 changes: 4 additions & 4 deletions build/integration/features/dav-v2.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: dav-v2
And As an "admin"
And user "user0" exists
And As an "user0"
When Downloading file "/files/user0/welcome.txt" with range "bytes=51-77"
When Downloading file "/files/user0/welcome.txt" with range "bytes=52-78"
Then Downloaded content should be "example file for developers"

Scenario: Downloading a file on the new endpoint should serve security headers
Expand All @@ -30,18 +30,18 @@ Feature: dav-v2
|X-Permitted-Cross-Domain-Policies|none|
|X-Robots-Tag|none|
|X-XSS-Protection|1; mode=block|
And Downloaded content should start with "Welcome to your ownCloud account!"
And Downloaded content should start with "Welcome to your Nextcloud account!"

Scenario: Doing a GET with a web login should work without CSRF token on the new backend
Given Logging in using web as "admin"
When Sending a "GET" to "/remote.php/dav/files/admin/welcome.txt" without requesttoken
Then Downloaded content should start with "Welcome to your ownCloud account!"
Then Downloaded content should start with "Welcome to your Nextcloud account!"
Then the HTTP status code should be "200"

Scenario: Doing a GET with a web login should work with CSRF token on the new backend
Given Logging in using web as "admin"
When Sending a "GET" to "/remote.php/dav/files/admin/welcome.txt" with requesttoken
Then Downloaded content should start with "Welcome to your ownCloud account!"
Then Downloaded content should start with "Welcome to your Nextcloud account!"
Then the HTTP status code should be "200"

Scenario: Doing a PROPFIND with a web login should not work without CSRF token on the new backend
Expand Down
10 changes: 5 additions & 5 deletions build/integration/features/sharing-v1.feature
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ Feature: sharing
And As an "user1"
When User "user1" deletes file "/textfile0 (2).txt"
And As an "user3"
And Downloading file "/textfile0 (2).txt" with range "bytes=1-7"
Then Downloaded content should be "wnCloud"
And Downloading file "/textfile0 (2).txt" with range "bytes=1-8"
Then Downloaded content should be "extcloud"

Scenario: getting share info of a share
Given user "user0" exists
Expand Down Expand Up @@ -500,9 +500,9 @@ Feature: sharing
And User "user1" moved file "/textfile0.txt" to "/common/textfile0.txt"
And User "user1" moved file "/common/textfile0.txt" to "/common/sub/textfile0.txt"
And As an "user2"
When Downloading file "/common/sub/textfile0.txt" with range "bytes=9-17"
When Downloading file "/common/sub/textfile0.txt" with range "bytes=10-18"
Then Downloaded content should be "test text"
And Downloaded content when downloading file "/textfile0.txt" with range "bytes=9-17" should be "test text"
And Downloaded content when downloading file "/textfile0.txt" with range "bytes=10-18" should be "test text"
And user "user2" should see following elements
| /common/sub/textfile0.txt |

Expand All @@ -521,7 +521,7 @@ Feature: sharing
And User "user1" moved file "/textfile0.txt" to "/common/textfile0.txt"
And User "user1" moved file "/common/textfile0.txt" to "/common/sub/textfile0.txt"
And As an "user2"
When Downloading file "/textfile0.txt" with range "bytes=9-17"
When Downloading file "/textfile0.txt" with range "bytes=10-18"
Then Downloaded content should be "test text"
And user "user2" should see following elements
| /common/sub/textfile0.txt |
Expand Down
18 changes: 9 additions & 9 deletions build/integration/features/webdav-related.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: webdav-related
Scenario: download a file with range
Given using dav path "remote.php/webdav"
And As an "admin"
When Downloading file "/welcome.txt" with range "bytes=51-77"
When Downloading file "/welcome.txt" with range "bytes=52-78"
Then Downloaded content should be "example file for developers"

Scenario: Upload forbidden if quota is 0
Expand All @@ -39,7 +39,7 @@ Feature: webdav-related
When user "user0" has a quota of "10 MB"
Then as "user0" gets properties of folder "/" with
|{DAV:}quota-available-bytes|
And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485429"
And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421"

Scenario: Retrieving folder quota of shared folder with quota when no quota is set for recipient
Given using dav path "remote.php/webdav"
Expand All @@ -57,15 +57,15 @@ Feature: webdav-related
| shareWith | user0 |
Then as "user0" gets properties of folder "/testquota" with
|{DAV:}quota-available-bytes|
And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485429"
And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421"

Scenario: download a public shared file with range
Given user "user0" exists
And As an "user0"
When creating a share with
| path | welcome.txt |
| shareType | 3 |
And Downloading last public shared file with range "bytes=51-77"
And Downloading last public shared file with range "bytes=52-78"
Then Downloaded content should be "example file for developers"

Scenario: download a public shared file inside a folder with range
Expand All @@ -74,8 +74,8 @@ Feature: webdav-related
When creating a share with
| path | PARENT |
| shareType | 3 |
And Downloading last public shared file inside a folder "/parent.txt" with range "bytes=1-7"
Then Downloaded content should be "wnCloud"
And Downloading last public shared file inside a folder "/parent.txt" with range "bytes=1-8"
Then Downloaded content should be "extcloud"

Scenario: Downloading a file on the old endpoint should serve security headers
Given using dav path "remote.php/webdav"
Expand All @@ -90,18 +90,18 @@ Feature: webdav-related
|X-Permitted-Cross-Domain-Policies|none|
|X-Robots-Tag|none|
|X-XSS-Protection|1; mode=block|
And Downloaded content should start with "Welcome to your ownCloud account!"
And Downloaded content should start with "Welcome to your Nextcloud account!"

Scenario: Doing a GET with a web login should work without CSRF token on the old backend
Given Logging in using web as "admin"
When Sending a "GET" to "/remote.php/webdav/welcome.txt" without requesttoken
Then Downloaded content should start with "Welcome to your ownCloud account!"
Then Downloaded content should start with "Welcome to your Nextcloud account!"
Then the HTTP status code should be "200"

Scenario: Doing a GET with a web login should work with CSRF token on the old backend
Given Logging in using web as "admin"
When Sending a "GET" to "/remote.php/webdav/welcome.txt" with requesttoken
Then Downloaded content should start with "Welcome to your ownCloud account!"
Then Downloaded content should start with "Welcome to your Nextcloud account!"
Then the HTTP status code should be "200"

Scenario: Doing a PROPFIND with a web login should not work without CSRF token on the old backend
Expand Down
2 changes: 1 addition & 1 deletion core/skeleton/welcome.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Welcome to your ownCloud account!
Welcome to your Nextcloud account!

This is just an example file for developers and git users.
The packaged and released versions will come with better examples.
Expand Down

0 comments on commit 1eebea3

Please sign in to comment.