Skip to content

Commit

Permalink
Add feature test to check paged deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
gdebrauwer committed Oct 16, 2019
1 parent 53a575c commit 9fb28c2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/Feature/MonitoringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,18 @@ public function test_completed_jobs_are_removed_from_database_when_their_tag_is_
dispatch(new StopMonitoringTag('first'));
$this->assertEquals(0, $this->monitoredJobs('first'));
}

public function test_all_completed_jobs_are_removed_from_database_when_their_tag_is_no_longer_monitored()
{
dispatch(new MonitorTag('first'));

for ($i = 0; $i < 80; $i++) {
Queue::push(new Jobs\BasicJob);
}

$this->work();

dispatch(new StopMonitoringTag('first'));
$this->assertEquals(0, $this->monitoredJobs('first'));
}
}

0 comments on commit 9fb28c2

Please sign in to comment.