Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
81e0a3ea
Commit
81e0a3ea
authored
9 years ago
by
Sergio Bertolin
Browse files
Options
Downloads
Patches
Plain Diff
Added test and logic for deleting all group shares
parent
630ba2fd
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/FeatureContext.php
+11
-2
11 additions, 2 deletions
build/integration/features/bootstrap/FeatureContext.php
build/integration/features/sharing-v1.feature
+16
-0
16 additions, 0 deletions
build/integration/features/sharing-v1.feature
with
27 additions
and
2 deletions
build/integration/features/bootstrap/FeatureContext.php
+
11
−
2
View file @
81e0a3ea
...
...
@@ -961,14 +961,23 @@ class FeatureContext implements Context, SnippetAcceptingContext {
/**
* @Then /^last share_id is included in the answer$/
*/
public
function
findingLastShareID
(){
print_r
(
$this
->
response
->
xml
());
public
function
checkingLastShareIDIsIncluded
(){
$share_id
=
$this
->
lastShareData
->
data
[
0
]
->
id
;
if
(
!
$this
->
isFieldInResponse
(
'id'
,
$share_id
)){
PHPUnit_Framework_Assert
::
fail
(
"Share id
$share_id
not found in response"
);
}
}
/**
* @Then /^last share_id is not included in the answer$/
*/
public
function
checkingLastShareIDIsNotIncluded
(){
$share_id
=
$this
->
lastShareData
->
data
[
0
]
->
id
;
if
(
$this
->
isFieldInResponse
(
'id'
,
$share_id
)){
PHPUnit_Framework_Assert
::
fail
(
"Share id
$share_id
has been found in response"
);
}
}
/**
* @Then /^Share fields of last share match with$/
* @param \Behat\Gherkin\Node\TableNode|null $formData
...
...
This diff is collapsed.
Click to expand it.
build/integration/features/sharing-v1.feature
+
16
−
0
View file @
81e0a3ea
...
...
@@ -312,6 +312,22 @@ Feature: sharing
And
the HTTP status code should be
"200"
And
last share_id is included in the answer
Scenario
:
Delete all group shares
Given
As an
"admin"
And
user
"user0"
exists
And
user
"user1"
exists
And
group
"group1"
exists
And
user
"user1"
belongs to group
"group1"
And
file
"textfile0.txt"
from user
"user0"
is shared with group
"group1"
And
User
"user1"
moved file
"/textfile0.txt"
to
"/FOLDER/textfile0.txt"
And
As an
"user0"
And
Deleting last share
And
As an
"user1"
When
sending
"GET"
to
"/apps/files_sharing/api/v1/shares?shared_with_me=true"
Then
the OCS status code should be
"100"
And
the HTTP status code should be
"200"
And
last share_id is not included in the answer
Scenario
:
delete a share
Given
user
"user0"
exists
And
user
"user1"
exists
...
...
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