[CalendarServer-changes] [4449] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Fri Jul 10 09:16:18 PDT 2009


Revision: 4449
          http://trac.macosforge.org/projects/calendarserver/changeset/4449
Author:   cdaboo at apple.com
Date:     2009-07-10 09:16:18 -0700 (Fri, 10 Jul 2009)
Log Message:
-----------
Add test for proper content-type on inbox items caused by a cancel.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/impliciterrors.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/implicit/errors/bad-content-type/
    CalDAVTester/trunk/Resource/implicit/errors/bad-content-type/1.ics
    CalDAVTester/trunk/Resource/implicit/errors/bad-content-type/2.xml

Added: CalDAVTester/trunk/Resource/implicit/errors/bad-content-type/1.ics
===================================================================
--- CalDAVTester/trunk/Resource/implicit/errors/bad-content-type/1.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/implicit/errors/bad-content-type/1.ics	2009-07-10 16:16:18 UTC (rev 4449)
@@ -0,0 +1,34 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Eastern
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051222T205953Z
+CREATED:20060101T150000Z
+DTSTART;TZID=US/Eastern:20060101T100000
+DURATION:PT1H
+SUMMARY:event 1
+UID:event1 at ninevah.local
+ORGANIZER;CN=$username1::$cuaddr1:
+ATTENDEE;CN=$username1:;PARTSTAT=ACCEPTED:$cuaddr1:
+ATTENDEE;CN=$username2:;RSVP=TRUE;PARTSTAT=NEEDS-ACTION:$cuaddr2:
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/implicit/errors/bad-content-type/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/implicit/errors/bad-content-type/2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/implicit/errors/bad-content-type/2.xml	2009-07-10 16:16:18 UTC (rev 4449)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:getcontenttype/>
+</D:prop>
+</D:propfind>

Modified: CalDAVTester/trunk/scripts/tests/impliciterrors.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/impliciterrors.xml	2009-07-10 16:13:41 UTC (rev 4448)
+++ CalDAVTester/trunk/scripts/tests/impliciterrors.xml	2009-07-10 16:16:18 UTC (rev 4449)
@@ -287,6 +287,178 @@
 			</request>
 		</test>
 	</test-suite>
+
+	<test-suite name='Bad content-type on Inbox' ignore='no'>
+		<test name='1'>
+			<description>Organizer creates event with Attendee</description>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$calendarpath1:/1.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/implicit/errors/bad-content-type/1.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Attendee Inbox Item</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$inboxpath2:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>1</value>
+				</header>
+				<data>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>count</name>
+						<value>1</value>
+					</arg>
+				</verify>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$inboxpath2:/</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/errors/bad-content-type/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:getcontenttype$text/calendar;charset=utf-8</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Attendee deletes Inbox Item</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$inboxpath2:/</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>DELETE</method>
+				<ruri>$</ruri>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>204</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4'>
+			<description>Organizer deletes event</description>
+			<request print-response='no'>
+				<method>DELETE</method>
+				<ruri>$calendarpath1:/1.ics</ruri>
+				<header>
+					<name>Content-Type</name>
+					<value>text/plain</value>
+				</header>
+				<header>
+					<name>Content-Length</name>
+					<value>0</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>Attendee Inbox Item</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$inboxpath2:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>1</value>
+				</header>
+				<data>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>count</name>
+						<value>1</value>
+					</arg>
+				</verify>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$inboxpath2:/</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/implicit/errors/bad-content-type/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:getcontenttype$text/calendar;charset=utf-8</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='9'>
+			<description>Clean-up</description>
+			<request user="$userid1:" pswd="$pswd1:">
+				<method>DELETEALL</method>
+				<ruri>$calendarpath1:/</ruri>
+			</request>
+			<request user="$userid1:" pswd="$pswd1:">
+				<method>DELETEALL</method>
+				<ruri>$inboxpath1:/</ruri>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:">
+				<method>DELETEALL</method>
+				<ruri>$calendarpath2:/</ruri>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:">
+				<method>DELETEALL</method>
+				<ruri>$inboxpath2:/</ruri>
+			</request>
+		</test>
+	</test-suite>
+
 	<end/>
 	
 </caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090710/0586ab6f/attachment-0001.html>


More information about the calendarserver-changes mailing list