Tests for run_task