throw Resque_RedisException whenever an errror connecting/talking to redis occurs

This commit is contained in:
Chris Boulton 2015-02-02 14:00:16 -08:00 committed by Chris Boulton
parent ee9f133bf9
commit 81cb92b964
4 changed files with 49 additions and 27 deletions

View file

@ -26,6 +26,15 @@ class Resque_Tests_JobTest extends Resque_Tests_TestCase
$this->assertTrue((bool)Resque::enqueue('jobs', 'Test_Job'));
}
/**
* @expectedException Resque_RedisException
*/
public function testRedisErrorThrowsExceptionOnJobCreation()
{
Resque::setBackend('redis://255.255.255.255:1234');
Resque::enqueue('jobs', 'This is a test');
}
public function testQeueuedJobCanBeReserved()
{
Resque::enqueue('jobs', 'Test_Job');