Taglib tests: Delete

This page tests that rivendell is correctly removing records from a database when using the Delete tag.

From v2.8.8 onwards Rivendell will calculate filter values itself rather than rely on them coming in from the request. This means POS should not get out or kilter due to situations where a developer has passed in the wrong (or missing) filter params OR where it is impossible to pass in correct filter params (when deleting multiple items for example).

Results

Test Expected Actual Result
Call Delete tag with no PK or WHERE attribute (should fail) Rows = 60 Rows = 60 PASS
Call Delete tag with empty PK attribute (should fail) Rows = 60 Rows = 60 PASS
Call Delete tag with empty WHERE attribute (should fail) Rows = 60 Rows = 60 PASS
Call Delete tag with both PK and WHERE attributes (should fail) Rows = 60 Rows = 60 PASS
Prepare a record to delete PK = 79 (# = matching rows) 1 1 PASS
Delete a record (via PK of 79) and check it's gone (# = matching rows) 0 0 PASS
Prepare some more records to play with (# = matching rows) 10 10 PASS
Delete some of those records (via where clause) and check they've gone (# = matching rows) 0 0 PASS
Check others are still there (# = matching rows) 5 5 PASS
Check POS values after deleting using where attribute 1,2,3 1,2,3 PASS
Check POS values after deleting using where attribute (and 2 filters in play) (1,2,3)(1,2)(1,2,3) (1,2,3)(1,2)(1,2,3) PASS
Check POS values after deleting using PK attribute (and 2 filters in play) (1,2,3)(1,2)(1,2) (1,2,3)(1,2)(1,2) PASS
Check numer of rows left after previous POS tests 7 7 PASS
Check we can do batch deletes from workflowXtra sections 0 0 PASS