\r
<!-- This tests the UpdateObjectLocationBatchJob -->\r
\r
- <testGroup ID="testSingleRecordBatchUpdate" autoDeletePOSTS="false">\r
+ <testGroup ID="testSingleRecordBatchUpdate" autoDeletePOSTS="true">\r
\r
<test ID="createBatchRecord">\r
<method>POST</method>\r
<expectedCodes>201</expectedCodes>\r
</test>\r
\r
+ <!-- The currentLocation value of this Movement record, which -->\r
+ <!-- has the most recent locationDate value, should thus be -->\r
+ <!-- reflected in the computedCurrentLocation value in the -->\r
+ <!-- CollectionObject record after invoking the batch job. -->\r
<test ID="createMovement2">\r
<method>POST</method>\r
<uri>/cspace-services/movements</uri>\r
<test ID="invokeBatch" auth="test" autoDeletePOSTS="false">\r
<method>POST</method>\r
<uri>/cspace-services/batch/${createBatchRecord.CSID}</uri>\r
- <filename>batch/batch-invoke-updateobjloc.xml</filename>\r
+ <filename>batch/batch-invoke-updateobjloc-single.xml</filename>\r
<vars>\r
<var ID="collectionObjectCSID">${createCollectionObject.CSID}</var>\r
</vars>\r
+ <expectedCodes>200</expectedCodes>\r
</test>\r
\r
+ <!-- Verify that, following the invocation of the batch job, the -->\r
+ <!-- computedCurrentLocation field in the CollectionObject record -->\r
+ <!-- has been updated to the appropriate value, reflecting the -->\r
+ <!-- most recent movement (e.g. the Movement record with latest locationDate). -->\r
<test ID="readUpdatedCollectionObjectRecord">\r
<method>GET</method>\r
<uri>/cspace-services/collectionobjects/${createCollectionObject.CSID}</uri>\r
<filename>batch/updateobjloc.xml</filename>\r
+ <response>\r
+ <expected level="TEXT" />\r
+ <filename>batch/res/collectionobject.res.xml</filename>\r
+ <vars>\r
+ <var ID="computedCurrentLocationValue">${createMovement2.currentLocation}</var>\r
+ </vars>\r
+ </response>\r
+ <expectedCodes>200</expectedCodes>\r
</test> \r
\r
</testGroup>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<document name="collectionobjects">
+
+ <ns2:collectionobjects_common
+ xmlns:ns2="http://collectionspace.org/services/collectionobject">
+ <computedCurrentLocation>${computedCurrentLocationValue}</computedCurrentLocation>
+ </ns2:collectionobjects_common>
+
+</document>
\ No newline at end of file