Mock previously unmocked calls.

This commit is contained in:
James Cole
2015-04-07 18:48:34 +02:00
parent 0d336727e8
commit f10f5d30bf
7 changed files with 69 additions and 23 deletions

View File

@@ -93,6 +93,9 @@ class BillControllerTest extends TestCase
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
$this->be($bill->user);
$repository = $this->mock('FireflyIII\Repositories\Bill\BillRepositoryInterface');
$repository->shouldReceive('destroy')->andReturn(true);
$this->call('POST', '/bills/destroy/' . $bill->id, ['_token' => 'replaceMe']);
$this->assertSessionHas('success', 'The bill was deleted.');