<uri>/cspace-services/movements/</uri>
<filename>versioning/movement.xml</filename>
<vars>
- <!-- The currentLocation value should properly be a Storage Location or Organization -->
- <!-- refName, but for the test-only function served by this temporary record, this -->
- <!-- value is instead an arbitrary string. -->
- <!-- (Note: that arbitrary string must also be present in one and only one -->
- <!-- Movement record for the search test below to succeed.) -->
+ <!-- This currentLocation value should properly be a Storage Location -->
+ <!-- or Organization refName, but for the test-only function served by -->
+ <!-- this temporary record, this value can instead be an arbitrary string. -->
+ <!-- (Note: that this arbitrary string must be uniquely present in one -->
+ <!-- and only one Movement record for the search test below to succeed.) -->
<var ID="currentLocationValue">jlmbsoqtqbfjotldjlmbsoq</var>
<var ID="currentLocationNoteValue">old current location note</var>
</vars>
<expectedCodes>201</expectedCodes>
</test>
+ <test ID="ListAllMovementRecords">
+ <method>GET</method>
+ <uri>/cspace-services/movements</uri>
+ </test>
+
<test ID="UpdateMovement" auth="admin@lifesci.collectionspace.org">
<method>PUT</method>
<uri>/cspace-services/movements/${CreateMovement.CSID}</uri>
<expectedCodes>200</expectedCodes>
</test>
- <!-- A keyword search on the current location value should retrieve only one -->
- <!-- document, even though there are now two documents extant: the current -->
- <!-- version and one past version, which was created as a result of the update. -->
+ <!-- The total number of Movement records reported should not change following -->
+ <!-- the update, even though a new version of one Movement document was created -->
+ <!-- as a result of that update. -->
+ <test ID="ListAllMovementRecordsFollowingUpdate">
+ <method>GET</method>
+ <uri>/cspace-services/movements</uri>
+ <response>
+ <expected level="ADDOK"/>
+ <vars>
+ <var ID="totalItemsValue">${ListAllMovementRecords.got("//totalItems")}</var>
+ </vars>
+ <filename>versioning/res/movement-list.res.xml</filename>
+ </response>
+ </test>
+
+ <!-- A keyword search on the (intended to be unique) currentLocation value -->
+ <!-- should retrieve only one document record, even though there are now two -->
+ <!-- documents extant containing that value: the current version and one past -->
+ <!-- version, which was created as a result of the update. -->
<test ID="SearchReturnsOnlyCurrentVersion">
<method>GET</method>
<uri>/cspace-services/movements?kw=${CreateMovement.currentLocationValue}</uri>
<response>
<expected level="ADDOK"/>
+ <vars>
+ <var ID="totalItemsValue">1</var>
+ </vars>
<filename>versioning/res/movement-list.res.xml</filename>
</response>
</test>
- <!-- Retrieving the document via a read (GET) request should also verify that only the -->
- <!-- current version, containing the most recently updated value(s), is returned. -->
+ <!-- Retrieving the document via a read (GET) request should also verify -->
+ <!-- that only the current version, containing the most recently updated -->
+ <!-- value(s), is returned. -->
<test ID="ReadReturnsOnlyCurrentVersion">
<method>GET</method>
<uri>/cspace-services/movements/${CreateMovement.CSID}</uri>