mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Took the time to fix the tests.
This commit is contained in:
@@ -93,8 +93,7 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testDestroy()
|
public function testDestroy()
|
||||||
{
|
{
|
||||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||||
$user = FactoryMuffin::create('FireflyIII\User');
|
$this->be($piggyBank->account->user);
|
||||||
$this->be($user);
|
|
||||||
|
|
||||||
$repository = $this->mock('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface');
|
$repository = $this->mock('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface');
|
||||||
$repository->shouldReceive('destroy')->once()->withAnyArgs()->andReturn(true);
|
$repository->shouldReceive('destroy')->once()->withAnyArgs()->andReturn(true);
|
||||||
@@ -109,8 +108,7 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testEdit()
|
public function testEdit()
|
||||||
{
|
{
|
||||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||||
$user = FactoryMuffin::create('FireflyIII\User');
|
$this->be($piggyBank->account->user);
|
||||||
$this->be($user);
|
|
||||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
$collection = new Collection([$account]);
|
$collection = new Collection([$account]);
|
||||||
|
|
||||||
@@ -135,8 +133,7 @@ class PiggyBankControllerTest extends TestCase
|
|||||||
public function testEditNullDate()
|
public function testEditNullDate()
|
||||||
{
|
{
|
||||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||||
$user = FactoryMuffin::create('FireflyIII\User');
|
$this->be($piggyBank->account->user);
|
||||||
$this->be($user);
|
|
||||||
$piggyBank->targetdate = null;
|
$piggyBank->targetdate = null;
|
||||||
$piggyBank->save();
|
$piggyBank->save();
|
||||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
|
Reference in New Issue
Block a user