Optimizes some of the reminder routines; still have to test future repetitions although it should work fine.

This commit is contained in:
James Cole
2014-08-24 09:18:36 +02:00
parent 6e17c805c2
commit d6c92f8c3b
6 changed files with 144 additions and 227 deletions

View File

@@ -313,9 +313,7 @@ class PiggybankControllerTest extends TestCase
$piggy = f::create('Piggybank');
$piggy->repeats = 0;
$piggy->save();
Event::shouldReceive('fire')->with('piggybanks.storePiggy',[$piggy])->once();
//Event::fire('piggybanks.storePiggy',[$piggyBank]);
//Event::fire('piggybanks.storeRepeated',[$piggyBank]);
Event::shouldReceive('fire')->with('piggybanks.store',[$piggy])->once();
$this->_piggybanks->shouldReceive('store')->once()->andReturn($piggy);
@@ -328,7 +326,7 @@ class PiggybankControllerTest extends TestCase
$piggy = f::create('Piggybank');
$piggy->repeats = 1;
$piggy->save();
Event::shouldReceive('fire')->with('piggybanks.storeRepeated',[$piggy])->once();
Event::shouldReceive('fire')->with('piggybanks.store',[$piggy])->once();
$this->_piggybanks->shouldReceive('store')->once()->andReturn($piggy);
$this->action('POST', 'PiggybankController@storeRepeated');
$this->assertResponseStatus(302);