Some more tests, don't know if they'll cover.

This commit is contained in:
James Cole
2014-07-09 13:35:33 +02:00
parent 84f4e80da1
commit 61f7fbe951
8 changed files with 90 additions and 9 deletions

View File

@@ -11,6 +11,13 @@ class Transaction extends Elegant
'amount' => 'required|between:-65536,65536',
];
public static $factory
= [
'account_id' => 'factory|Account',
'transaction_journal_id' => 'factory|TransactionJournal',
'description' => 'string',
'amount' => 'integer:5'
];
public function account()
{
@@ -31,6 +38,7 @@ class Transaction extends Elegant
{
return $this->belongsToMany('Budget');
}
public function categories()
{
return $this->belongsToMany('Category');