Added unicity to AccountType model. Fixed some tests because of this.

This commit is contained in:
James Cole
2014-08-31 10:03:24 +02:00
parent 58b3334f05
commit 2e342e47a7
4 changed files with 49 additions and 80 deletions

View File

@@ -77,10 +77,8 @@ class ChartControllerTest extends TestCase
public function testHomeAccountInfo()
{
$account = f::create('Account');
$type = f::create('AccountType');
$type->type = 'Default account';
$type->save();
$account->accounttype()->associate($type);
$accountType = \AccountType::whereType('Default account')->first();
$account->accounttype()->associate($accountType);
$account->save();
// for successful binding:
Auth::shouldReceive('user')->andReturn($account->user()->first());