Fix the test to expect the new behaviour

This commit is contained in:
Joas Schilling 2015-12-18 15:05:32 +01:00
parent 6b813f56c9
commit 54558bb5b2
1 changed files with 9 additions and 2 deletions

View File

@ -23,10 +23,17 @@ class Job extends \Test\TestCase {
});
$jobList->add($job);
$logger = $this->getMockBuilder('OCP\ILogger')
->disableOriginalConstructor()
->getMock();
$logger->expects($this->once())
->method('error')
->with('Error while running background job: ');
$this->assertCount(1, $jobList->getAll());
$job->execute($jobList);
$job->execute($jobList, $logger);
$this->assertTrue($this->run);
$this->assertCount(0, $jobList->getAll());
$this->assertCount(1, $jobList->getAll());
}
public function markRun() {