mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 07:38:29 +00:00
Merge branch 'feature/twig' into develop
This commit is contained in:
@@ -51,6 +51,8 @@ class PiggyBankControllerTest extends TestCase
|
||||
$repository = $this->mock('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
||||
$repository->shouldReceive('leftOnAccount')->withAnyArgs()->andReturn(12);
|
||||
Amount::shouldReceive('format')->andReturn('XXxx');
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
|
||||
Amount::shouldReceive('getCurrencySymbol')->andReturn('X');
|
||||
|
||||
$this->call('GET', '/piggy-banks/add/' . $piggyBank->id);
|
||||
$this->assertResponseOk();
|
||||
@@ -182,6 +184,7 @@ class PiggyBankControllerTest extends TestCase
|
||||
Steam::shouldReceive('balance')->andReturn(20);
|
||||
$accounts->shouldReceive('leftOnAccount')->andReturn(12);
|
||||
Amount::shouldReceive('format')->andReturn('123');
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
|
||||
|
||||
|
||||
$this->call('GET', '/piggy-banks');
|
||||
@@ -221,6 +224,7 @@ class PiggyBankControllerTest extends TestCase
|
||||
$piggyBanks->shouldReceive('createEvent')->once();
|
||||
|
||||
Amount::shouldReceive('format')->andReturn('something');
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
|
||||
|
||||
$this->call('POST', '/piggy-banks/add/' . $piggyBank->id, ['_token' => 'replaceMe']);
|
||||
$this->assertResponseStatus(302);
|
||||
@@ -238,6 +242,7 @@ class PiggyBankControllerTest extends TestCase
|
||||
$piggyBanks->shouldReceive('createEvent')->once();
|
||||
|
||||
Amount::shouldReceive('format')->andReturn('something');
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
|
||||
|
||||
$this->call('POST', '/piggy-banks/add/' . $piggyBank->id, ['_token' => 'replaceMe', 'amount' => '10000']);
|
||||
$this->assertResponseStatus(302);
|
||||
@@ -286,6 +291,8 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->be($piggyBank->account->user);
|
||||
|
||||
Amount::shouldReceive('format')->andReturn('something');
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
|
||||
Amount::shouldReceive('getCurrencySymbol')->andReturn('X');
|
||||
|
||||
$this->call('GET', '/piggy-banks/remove/' . $piggyBank->id);
|
||||
$this->assertResponseOk();
|
||||
|
||||
Reference in New Issue
Block a user