Test that delete_on_views functions correctly and fix delete_on_views because it didn't
Add test for deleting at a specific date and fix code (as it was broken)