[CalendarServer-changes] [15029] CalDAVTester/trunk/scripts/tests/CalDAV/recurrence-splitting.xml

source_changes at macosforge.org source_changes at macosforge.org
Tue Aug 4 12:55:06 PDT 2015


Revision: 15029
          http://trac.calendarserver.org//changeset/15029
Author:   cdaboo at apple.com
Date:     2015-08-04 12:55:06 -0700 (Tue, 04 Aug 2015)
Log Message:
-----------
Test that POST+split with duplicate uid fails properly.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/CalDAV/recurrence-splitting.xml

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/recurrence-splitting.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/recurrence-splitting.xml	2015-08-04 17:39:33 UTC (rev 15028)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/recurrence-splitting.xml	2015-08-04 19:55:06 UTC (rev 15029)
@@ -1168,6 +1168,131 @@
 		</test>
 	</test-suite>
 
+	<test-suite name='Client does same split'>
+		<test name='1'>
+			<description>Create event</description>
+			<request>
+				<method>PUT</method>
+				<ruri>$calendarpath1:/1.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/recurrence-splitting/simple/1.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>POST to split</description>
+			<request>
+				<method>POST</method>
+				<ruri>$calendarpath1:/1.ics?action=split&amp;rid=$now.0:T000000Z&amp;uid=$uid2:</ruri>
+				<header>
+					<name>Prefer</name>
+					<value>return=representation</value>
+				</header>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>totalcount</name>
+						<value>2</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>xmlElementMatch</callback>
+					<arg>
+						<name>exists</name>
+						<value>$verify-property-prefix:/{DAV:}getetag</value>
+						<value>$verify-property-prefix:/{urn:ietf:params:xml:ns:caldav}calendar-data</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>$multistatus-href-prefix:</name>
+					<variable>$href1:</variable>
+					<variable>$href2:</variable>
+				</grabelement>
+			</request>
+			<request>
+				<method>GET</method>
+				<ruri>$href2:</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<grabcalproperty>
+					<name>VEVENT/UID</name>
+					<variable>$olduid:</variable>
+				</grabcalproperty>
+				<grabcalproperty>
+					<name>VEVENT/RELATED-TO</name>
+					<variable>$relid:</variable>
+				</grabcalproperty>
+			</request>
+		</test>
+		<test name='3'>
+			<description>GET new-part split (original) resource</description>
+			<request>
+				<method>GET</method>
+				<ruri>$href1:</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/recurrence-splitting/simple/2.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4'>
+			<description>GET old-part split (new resource)</description>
+			<request>
+				<method>GET</method>
+				<ruri>$href2:</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/recurrence-splitting/simple/3.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>POST to split again</description>
+			<request>
+				<method>POST</method>
+				<ruri>$calendarpath1:/1.ics?action=split&amp;rid=$now.10:T000000Z&amp;uid=$uid2:</ruri>
+				<header>
+					<name>Prefer</name>
+					<value>return=representation</value>
+				</header>
+				<verify>
+					<callback>prepostcondition</callback>
+					<arg>
+						<name>error</name>
+						<value>{$CS:}valid-split</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='-1'>
+			<description>Clean-up</description>
+			<request>
+				<method>DELETEALL</method>
+				<ruri>$calendarpath1:/</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
 	<test-suite name='Client splits unscheduled, then schedules existing resource'>
 		<test name='1'>
 			<description>Create event</description>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150804/429fbb75/attachment.html>


More information about the calendarserver-changes mailing list