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
83975a05
Commit
83975a05
authored
Mar 22, 2017
by
Sergio Bertolin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests including files properties
parent
1d4fcf95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
tests/integration/features/bootstrap/WebDav.php
tests/integration/features/bootstrap/WebDav.php
+9
-0
tests/integration/features/comments.feature
tests/integration/features/comments.feature
+16
-1
No files found.
tests/integration/features/bootstrap/WebDav.php
View file @
83975a05
...
...
@@ -327,6 +327,15 @@ trait WebDav {
$value
=
$value
[
0
];
}
}
if
(
$expectedValue
===
"a_comment_url"
){
if
(
preg_match
(
"#^/remote.php/dav/comments/files/([0-9]+)$#"
,
$value
))
{
return
0
;
}
else
{
throw
new
\
Exception
(
"Property
\"
$key
\"
found with value
\"
$value
\"
, expected
\"
$expectedValue
\"
"
);
}
}
if
(
$value
!=
$expectedValue
)
{
throw
new
\
Exception
(
"Property
\"
$key
\"
found with value
\"
$value
\"
, expected
\"
$expectedValue
\"
"
);
}
...
...
tests/integration/features/comments.feature
View file @
83975a05
...
...
@@ -88,4 +88,19 @@ Feature: Comments
When
user
"user0"
edits
last
comment
with
content
"User1
edited
comment"
Then
the HTTP status code should be
"403"
And
user
"user0"
should have the following comments on file
"/myFileToComment.txt"
|
user1
|
Sharee
comment
|
\ No newline at end of file
|
user1
|
Sharee
comment
|
Scenario
:
Getting info of comments using files endpoint
Given
user
"user0"
exists
And
As an
"user0"
And
User
"user0"
uploads file
"data/textfile.txt"
to
"/myFileToComment.txt"
And
user
"user0"
comments with content
"My first comment"
on file
"/myFileToComment.txt"
And
user
"user0"
should have the following comments on file
"/myFileToComment.txt"
|
user0
|
My
first
comment
|
When
as
"user0"
gets
properties
of
folder
"/myFileToComment.txt"
with
|
{http://owncloud.org/ns}comments-href
|
|
{http://owncloud.org/ns}comments-count
|
|
{http://owncloud.org/ns}comments-unread
|
#Then the single response should contain a property "{http://owncloud.org/ns}comments-count" with value "1"
And the single response should contain a property "{http
:
//owncloud.org/ns}comments-unread"
with
value
"0"
And the single response should contain a property "{http
:
//owncloud.org/ns}comments-href"
with
value
"a_comment_url"
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