Merge branch 'master' of github.com:DAViCal/davical into github
[davical.git] / testing / tests / regression-suite / 0811-Spec-LOCK-1.test
blob93f297f9265cb07a20ad764b428505cd1e0914fb
2 # Test specification compliance for LOCK request
3 # - Refresh the lock
4 # No data is needed for a refresh
6 TYPE=LOCK
7 URL=http://regression.host/caldav.php/user1/home/
9 # Save the original lock time for later use
10 GETSQL=oldlocktime
11 SELECT start FROM locks WHERE dav_name = '/user1/home/'
12 ENDSQL
14 # Get the lock token from the earlier lock
15 GETSQL=locktoken
16 SELECT opaquelocktoken FROM locks WHERE dav_name = '/user1/home/'
17 ENDSQL
19 HEADER=Depth: 0
20 HEADER=Timeout: Infinite,Second-4100000000
21 HEADER=Lock-Token: <opaquelocktoken:##locktoken##>
22 HEAD
25 # Do a query after the request
26 QUERY
27 SELECT 'Refreshed (should be 1)', start != '##oldlocktime##'::timestamp AS refresh_success FROM locks WHERE dav_name = '/user1/home/'
28 ENDQUERY