[CalendarServer-changes] [15462] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon Feb 15 08:02:00 PST 2016
Revision: 15462
http://trac.calendarserver.org//changeset/15462
Author: cdaboo at apple.com
Date: 2016-02-15 08:02:00 -0800 (Mon, 15 Feb 2016)
Log Message:
-----------
Tests for invalid vcards during simple/crud bulk create requests.
Modified Paths:
--------------
CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml
Added Paths:
-----------
CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml
CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf
Added: CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml 2016-02-15 16:02:00 UTC (rev 15462)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<MM:multiput xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav" xmlns:MM="http://me.com/_namespace/">
+<MM:resource>
+<D:set>
+<C:address-data><![CDATA[BEGIN:VCARD
+VERSION:3.0
+N:01;User;;;
+FN:User 01
+EMAIL;type=INTERNET;type=WORK;type=pref:user01 at example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+ADR;type=WORK;type=pref:;;1245 Test;Happy House
+Sesame Street;California;11111;USA
+UID:user01-uid08
+END:VCARD
+]]>
+</C:address-data>
+</D:set>
+</MM:resource>
+</MM:multiput>
Added: CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf 2016-02-15 16:02:00 UTC (rev 15462)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:01;User;;;
+FN:User 01
+EMAIL;type=INTERNET;type=WORK;type=pref:user01 at example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+ADR;type=WORK;type=pref:;;1245 Test;Happy House
+Sesame Street;California;11111;USA
+UID:user01-uid15
+END:VCARD
Modified: CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml 2016-02-08 19:11:11 UTC (rev 15461)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml 2016-02-15 16:02:00 UTC (rev 15462)
@@ -713,6 +713,27 @@
</test>
</test-suite>
+ <test-suite name='Simple POST - bad vcard'>
+ <test name='1'>
+ <description>POST single bad vcard</description>
+ <request>
+ <method>POST</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/bulk/simple/15.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>400</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
<test-suite name='CRUD POST - one vcard create'>
<test name='1'>
<description>POST single new vcard</description>
@@ -1511,6 +1532,27 @@
</test>
</test-suite>
+ <test-suite name='CRUD POST - bad vcard'>
+ <test name='1'>
+ <description>POST single new vcard</description>
+ <request>
+ <method>POST</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/bulk/crud-one/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-bad-response:[*400]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
<end/>
</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20160215/f4406420/attachment.html>
More information about the calendarserver-changes
mailing list