Fixed some tests.

This commit is contained in:
James Cole
2015-06-29 07:59:06 +02:00
parent 0c6dd5cd16
commit bf2a104a4e
4 changed files with 77 additions and 6 deletions

View File

@@ -137,4 +137,26 @@ class AccountModelTest extends TestCase
}
/**
* @covers FireflyIII\Models\Account::getNameForEditformAttribute
*/
public function testGetNameForEditformAttribute()
{
// normal name is normal
$account = FactoryMuffin::create('FireflyIII\Models\Account');
$this->assertEquals($account->name, $account->getNameForEditformAttribute());
}
/**
* @covers FireflyIII\Models\Account::getNameForEditformAttribute
*/
public function testGetNameForEditformAttributeCash()
{
FactoryMuffin::create('FireflyIII\Models\AccountType');
FactoryMuffin::create('FireflyIII\Models\AccountType');
FactoryMuffin::create('FireflyIII\Models\AccountType');
// cash name is empty
$account = FactoryMuffin::create('FireflyIII\Models\Account');
$this->assertEquals('', $account->getNameForEditformAttribute());
}
}