Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
6d8d5f7b
Unverified
Commit
6d8d5f7b
authored
8 years ago
by
Vincent Petry
Committed by
Roeland Jago Douma
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add integration tests for double shares with rename in between
parent
2404f6a5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/integration/features/bootstrap/WebDav.php
+4
-4
4 additions, 4 deletions
build/integration/features/bootstrap/WebDav.php
build/integration/features/sharing-v1.feature
+30
-0
30 additions, 0 deletions
build/integration/features/sharing-v1.feature
with
34 additions
and
4 deletions
build/integration/features/bootstrap/WebDav.php
+
4
−
4
View file @
6d8d5f7b
...
...
@@ -87,12 +87,12 @@ trait WebDav {
}
/**
* @Given /^User "([^"]*)" moved file "([^"]*)" to "([^"]*)"$/
* @Given /^User "([^"]*)" moved
(
file
|folder|entry)
"([^"]*)" to "([^"]*)"$/
* @param string $user
* @param string $fileSource
* @param string $fileDestination
*/
public
function
userMovedFile
(
$user
,
$fileSource
,
$fileDestination
){
public
function
userMovedFile
(
$user
,
$entry
,
$fileSource
,
$fileDestination
){
$fullUrl
=
substr
(
$this
->
baseUrl
,
0
,
-
4
)
.
$this
->
davPath
;
$headers
[
'Destination'
]
=
$fullUrl
.
$fileDestination
;
$this
->
response
=
$this
->
makeDavRequest
(
$user
,
"MOVE"
,
$fileSource
,
$headers
);
...
...
@@ -100,12 +100,12 @@ trait WebDav {
}
/**
* @When /^User "([^"]*)" moves file "([^"]*)" to "([^"]*)"$/
* @When /^User "([^"]*)" moves
(
file
|folder|entry)
"([^"]*)" to "([^"]*)"$/
* @param string $user
* @param string $fileSource
* @param string $fileDestination
*/
public
function
userMovesFile
(
$user
,
$fileSource
,
$fileDestination
){
public
function
userMovesFile
(
$user
,
$entry
,
$fileSource
,
$fileDestination
){
$fullUrl
=
substr
(
$this
->
baseUrl
,
0
,
-
4
)
.
$this
->
davPath
;
$headers
[
'Destination'
]
=
$fullUrl
.
$fileDestination
;
$this
->
response
=
$this
->
makeDavRequest
(
$user
,
"MOVE"
,
$fileSource
,
$headers
);
...
...
This diff is collapsed.
Click to expand it.
build/integration/features/sharing-v1.feature
+
30
−
0
View file @
6d8d5f7b
...
...
@@ -888,3 +888,33 @@ Feature: sharing
And
the
single
response
should
contain
a
property
"{http://owncloud.org/ns}permissions"
with
value
"RDNVCK"
And
as
"user0"
the folder
"merge-test-inside-twogroups-perms (2)"
does not exist
And
as
"user0"
the folder
"merge-test-inside-twogroups-perms (3)"
does not exist
Scenario
:
Merging shares for recipient when shared from outside with group then user and recipient renames in between
Given
As an
"admin"
And
user
"user0"
exists
And
user
"user1"
exists
And
group
"group1"
exists
And
user
"user1"
belongs to group
"group1"
And
user
"user0"
created a folder
"merge-test-outside-groups-renamebeforesecondshare"
When
folder
"merge-test-outside-groups-renamebeforesecondshare"
of user
"user0"
is shared with group
"group1"
And
User
"user1"
moved folder
"/merge-test-outside-groups-renamebeforesecondshare"
to
"/merge-test-outside-groups-renamebeforesecondshare-renamed"
And
folder
"merge-test-outside-groups-renamebeforesecondshare"
of user
"user0"
is shared with user
"user1"
Then
as
"user1"
gets properties of folder
"merge-test-outside-groups-renamebeforesecondshare-renamed"
with
|
{http://owncloud.org/ns}permissions
|
And
the
single
response
should
contain
a
property
"{http://owncloud.org/ns}permissions"
with
value
"SRDNVCK"
And
as
"user1"
the folder
"merge-test-outside-groups-renamebeforesecondshare"
does not exist
Scenario
:
Merging shares for recipient when shared from outside with user then group and recipient renames in between
Given
As an
"admin"
And
user
"user0"
exists
And
user
"user1"
exists
And
group
"group1"
exists
And
user
"user1"
belongs to group
"group1"
And
user
"user0"
created a folder
"merge-test-outside-groups-renamebeforesecondshare"
When
folder
"merge-test-outside-groups-renamebeforesecondshare"
of user
"user0"
is shared with user
"user1"
And
User
"user1"
moved folder
"/merge-test-outside-groups-renamebeforesecondshare"
to
"/merge-test-outside-groups-renamebeforesecondshare-renamed"
And
folder
"merge-test-outside-groups-renamebeforesecondshare"
of user
"user0"
is shared with group
"group1"
Then
as
"user1"
gets properties of folder
"merge-test-outside-groups-renamebeforesecondshare-renamed"
with
|
{http://owncloud.org/ns}permissions
|
And
the
single
response
should
contain
a
property
"{http://owncloud.org/ns}permissions"
with
value
"SRDNVCK"
And
as
"user1"
the folder
"merge-test-outside-groups-renamebeforesecondshare"
does not exist
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment