Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
our_own_cloud_project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
86e4720c
Commit
86e4720c
authored
Mar 29, 2017
by
Sergio Bertolin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test to check that public shares are gone when the file is deleted
parent
863299a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
+64
-0
tests/integration/features/bootstrap/Sharing.php
tests/integration/features/bootstrap/Sharing.php
+7
-0
tests/integration/features/sharing-v1.feature
tests/integration/features/sharing-v1.feature
+57
-0
No files found.
tests/integration/features/bootstrap/Sharing.php
View file @
86e4720c
...
@@ -542,6 +542,13 @@ trait Sharing {
...
@@ -542,6 +542,13 @@ trait Sharing {
if
(
$TableNode
instanceof
\
Behat\Gherkin\Node\TableNode
)
{
if
(
$TableNode
instanceof
\
Behat\Gherkin\Node\TableNode
)
{
$elementRows
=
$TableNode
->
getRows
();
$elementRows
=
$TableNode
->
getRows
();
if
(
$elementRows
[
0
][
0
]
===
''
)
{
//It shouldn't have public shares
PHPUnit_Framework_Assert
::
assertEquals
(
count
(
$dataResponded
),
0
);
return
0
;
}
foreach
(
$elementRows
as
$expectedElementsArray
)
{
foreach
(
$elementRows
as
$expectedElementsArray
)
{
//0 path, 1 permissions, 2 name
//0 path, 1 permissions, 2 name
$nameFound
=
false
;
$nameFound
=
false
;
...
...
tests/integration/features/sharing-v1.feature
View file @
86e4720c
...
@@ -1241,3 +1241,60 @@ Feature: sharing
...
@@ -1241,3 +1241,60 @@ Feature: sharing
|
/textfile0.txt
|
1
|
sharedlink2
|
|
/textfile0.txt
|
1
|
sharedlink2
|
|
/textfile0.txt
|
1
|
sharedlink1
|
|
/textfile0.txt
|
1
|
sharedlink1
|
|
/textfile0.txt
|
1
|
sharedlink3
|
|
/textfile0.txt
|
1
|
sharedlink3
|
Scenario
:
Check that updating password doesn't remove name of links
Given
user
"user0"
exists
And
As an
"user0"
And
creating a share with
|
path
|
FOLDER
|
|
shareType
|
3
|
|
password
|
publicpw
|
|
expireDate
|
+3
days
|
|
publicUpload
|
true
|
|
permissions
|
15
|
|
name
|
sharedlink1
|
And
the OCS status code should be
"100"
And
the HTTP status code should be
"200"
And
creating a share with
|
path
|
FOLDER
|
|
shareType
|
3
|
|
password
|
publicpw
|
|
expireDate
|
+3
days
|
|
publicUpload
|
true
|
|
permissions
|
15
|
|
name
|
sharedlink2
|
And
the OCS status code should be
"100"
And
the HTTP status code should be
"200"
When
Updating last share with
|
password
|
newpassword
|
Then
the
OCS
status
code
should
be
"100"
And
the HTTP status code should be
"200"
And
user
"user0"
checks public shares of folder
"/FOLDER"
|
/FOLDER
|
15
|
sharedlink2
|
|
/FOLDER
|
15
|
sharedlink1
|
Scenario
:
Deleting a file deletes also its public links
Given
user
"user0"
exists
And
As an
"user0"
And
creating a share with
|
path
|
textfile0.txt
|
|
shareType
|
3
|
|
password
|
publicpw
|
|
expireDate
|
+3
days
|
|
permissions
|
1
|
|
name
|
sharedlink1
|
And
the OCS status code should be
"100"
And
the HTTP status code should be
"200"
And
creating a share with
|
path
|
textfile0.txt
|
|
shareType
|
3
|
|
password
|
publicpw
|
|
expireDate
|
+3
days
|
|
permissions
|
1
|
|
name
|
sharedlink2
|
And
User
"user0"
deletes file
"/textfile0.txt"
And
the HTTP status code should be
"204"
When
User
"user0"
uploads file
"data/textfile.txt"
to
"/textfile0.txt"
Then
the HTTP status code should be
"201"
And
user
"user0"
checks public shares of file
"/textfile0.txt"
|
|
|
|
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment