Fix test data.

This commit is contained in:
James Cole
2015-07-19 12:21:51 +02:00
parent a07c52e0d8
commit 4feff18af5

View File

@@ -364,6 +364,10 @@ class TestDataSeeder extends Seeder
protected function createIncome($description, Carbon $date, $amount) protected function createIncome($description, Carbon $date, $amount)
{ {
$date = new Carbon($date->format('Y-m') . '-23'); // paid on 23rd. $date = new Carbon($date->format('Y-m') . '-23'); // paid on 23rd.
$today = new Carbon;
if ($date >= $today) {
return null;
}
$toAccount = $this->findAccount('MyBank Checking Account'); $toAccount = $this->findAccount('MyBank Checking Account');
$fromAccount = $this->findAccount('Job'); $fromAccount = $this->findAccount('Job');
$category = Category::firstOrCreateEncrypted(['name' => 'Salary', 'user_id' => $this->user->id]); $category = Category::firstOrCreateEncrypted(['name' => 'Salary', 'user_id' => $this->user->id]);