Fixing tests.

This commit is contained in:
James Cole
2015-05-17 10:36:11 +02:00
parent 63050907b9
commit 01cd3333e4
2 changed files with 7 additions and 29 deletions

View File

@@ -37,31 +37,6 @@ class BillControllerTest extends TestCase
}
public function testAdd()
{
// create a bill:
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
$this->be($bill->user);
// create an expense account:
$expense = FactoryMuffin::create('FireflyIII\Models\Account');
// fix the name of the expense account to match one of the words
// in the bill:
$words = explode(',', $bill->match);
$word = $words[1];
$expense->name = $word;
$expense->save();
// mock repository:
$repository = $this->mock('FireflyIII\Repositories\Account\AccountRepositoryInterface');
$repository->shouldReceive('getAccounts')->andReturn([$expense]);
// go!
$this->call('GET', '/bills/add/' . $bill->id);
$this->assertSessionHas('preFilled');
$this->assertRedirectedToRoute('transactions.create', ['withdrawal']);
}
public function testCreate()
{
// go!