Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
5b0c0955
Unverified
Commit
5b0c0955
authored
Dec 06, 2016
by
Vincent Petry
Browse files
Add integration test for creating folder with colon
parent
79ff5a2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
build/integration/features/bootstrap/WebDav.php
View file @
5b0c0955
...
...
@@ -3,6 +3,7 @@
use
GuzzleHttp\Client
as
GClient
;
use
GuzzleHttp\Message\ResponseInterface
;
use
Sabre\DAV\Client
as
SClient
;
use
Sabre\DAV\Xml\Property\ResourceType
;
require
__DIR__
.
'/../../vendor/autoload.php'
;
...
...
@@ -296,6 +297,14 @@ trait WebDav {
}
$value
=
$keys
[
$key
];
if
(
$value
instanceof
ResourceType
)
{
$value
=
$value
->
getValue
();
if
(
empty
(
$value
))
{
$value
=
''
;
}
else
{
$value
=
$value
[
0
];
}
}
if
(
$value
!=
$expectedValue
)
{
throw
new
\
Exception
(
"Property
\"
$key
\"
found with value
\"
$value
\"
, expected
\"
$expectedValue
\"
"
);
}
...
...
build/integration/features/webdav-related.feature
View file @
5b0c0955
...
...
@@ -414,3 +414,19 @@ Feature: webdav-related
When
Downloading file
"/welcome.txt"
as
"userToBeDisabled"
Then
the HTTP status code should be
"503"
Scenario
:
Creating a folder
Given
using old dav path
And
user
"user0"
exists
And
user
"user0"
created a folder
"/test_folder"
When
as
"user0"
gets properties of folder
"/test_folder"
with
|
{DAV:}resourcetype
|
Then
the
single
response
should
contain
a
property
"{DAV:}resourcetype"
with
value
"{DAV:}collection"
Scenario
:
Creating a folder with special chars
Given
using old dav path
And
user
"user0"
exists
And user "user0" created a folder "/test_folder
:
5"
When as "user0" gets properties of folder "/test_folder
:
5"
with
|
{DAV:}resourcetype
|
Then
the
single
response
should
contain
a
property
"{DAV:}resourcetype"
with
value
"{DAV:}collection"
Write
Preview
Supports
Markdown
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