Add tests for task filtering routes
Extract shared examples