summaryrefslogtreecommitdiff
path: root/test/scripts/tests/CalDAV/current-user-principal.xml
diff options
context:
space:
mode:
Diffstat (limited to 'test/scripts/tests/CalDAV/current-user-principal.xml')
-rw-r--r--test/scripts/tests/CalDAV/current-user-principal.xml178
1 files changed, 178 insertions, 0 deletions
diff --git a/test/scripts/tests/CalDAV/current-user-principal.xml b/test/scripts/tests/CalDAV/current-user-principal.xml
new file mode 100644
index 0000000..4324903
--- /dev/null
+++ b/test/scripts/tests/CalDAV/current-user-principal.xml
@@ -0,0 +1,178 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2013 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<caldavtest>
+ <description>Test DAV:current-user-principal support</description>
+
+ <require-feature>
+ <feature>caldav</feature>
+ <feature>current-user-principal</feature>
+ </require-feature>
+
+ <start/>
+
+ <test-suite name='Check for the property on /' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>Check for authenticated property on /</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$root:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri1:</href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Check for unauthenticated property on /</description>
+ <request auth="no">
+ <method>PROPFIND</method>
+ <ruri>$root:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>401</value>
+ </arg>
+ </verify>
+<!-- <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<unauthenticated xmlns="DAV:"/>]]></value>
+ </arg>
+ </verify>
+-->
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>Check for authenticated property on / (user02)</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$root:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri2:</href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Check for the property on /principals/' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>Check for authenticated property on /</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$principalcollection:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri1:</href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Check for unauthenticated property on /</description>
+ <request auth="no">
+ <method>PROPFIND</method>
+ <ruri>$principalcollection:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>401</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>Check for authenticated property on / (user02)</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$principalcollection:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri2:</href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <end/>
+</caldavtest>