This should fix all twig tests. Let's find out!

This commit is contained in:
James Cole
2015-05-02 19:44:12 +02:00
parent efe6f59f79
commit c7ae15a41a
12 changed files with 123 additions and 10 deletions

View File

@@ -72,6 +72,7 @@ class BillControllerTest extends TestCase
$currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency);
Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]);
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
$this->call('GET', '/bills/create');
$this->assertViewHas('subTitle', 'Create new');
@@ -111,6 +112,7 @@ class BillControllerTest extends TestCase
$currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency);
Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]);
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
$this->call('GET', '/bills/edit/' . $bill->id);
$this->assertViewHas('subTitle', 'Edit "' . e($bill->name) . '"');
@@ -126,6 +128,7 @@ class BillControllerTest extends TestCase
$collection->push($bill);
Amount::shouldReceive('format')->andReturn('XX');
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
$repository = $this->mock('FireflyIII\Repositories\Bill\BillRepositoryInterface');
$repository->shouldReceive('getBills')->once()->andReturn($collection);
@@ -187,6 +190,8 @@ class BillControllerTest extends TestCase
Amount::shouldReceive('format')->andReturn('XX');
Amount::shouldReceive('getCurrencyCode')->andReturn('XX');
$this->call('GET', '/bills/show/' . $bill->id);
}