mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-20 21:43:08 -06:00
This should fix the tests.
This commit is contained in:
parent
cd27f0ad69
commit
124c9303b9
@ -318,6 +318,8 @@ class PiggyBankController extends Controller
|
||||
'startdate' => new Carbon,
|
||||
'account_id' => intval($request->get('account_id')),
|
||||
'targetamount' => floatval($request->get('targetamount')),
|
||||
'remind_me' => false,
|
||||
'reminder_skip' => 0,
|
||||
'targetdate' => strlen($request->get('targetdate')) > 0 ? new Carbon($request->get('targetdate')) : null,
|
||||
];
|
||||
|
||||
@ -351,6 +353,8 @@ class PiggyBankController extends Controller
|
||||
'startdate' => is_null($piggyBank->startdate) ? $piggyBank->created_at : $piggyBank->startdate,
|
||||
'account_id' => intval($request->get('account_id')),
|
||||
'targetamount' => floatval($request->get('targetamount')),
|
||||
'remind_me' => false,
|
||||
'reminder_skip' => 0,
|
||||
'targetdate' => strlen($request->get('targetdate')) > 0 ? new Carbon($request->get('targetdate')) : null,
|
||||
];
|
||||
|
||||
|
@ -43,7 +43,7 @@ class PiggyBank extends Model
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable
|
||||
= ['name', 'account_id', 'order', 'targetamount', 'startdate', 'targetdate'];
|
||||
= ['name', 'account_id', 'order', 'targetamount', 'startdate', 'targetdate', 'remind_me', 'reminder_skip'];
|
||||
protected $hidden = ['targetamount_encrypted', 'encrypted'];
|
||||
|
||||
/**
|
||||
|
@ -116,6 +116,9 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
*/
|
||||
public function store(array $data)
|
||||
{
|
||||
$data['remind_me'] = false;
|
||||
$data['reminder_skip'] = 0;
|
||||
|
||||
$piggyBank = PiggyBank::create($data);
|
||||
|
||||
return $piggyBank;
|
||||
|
@ -237,6 +237,8 @@ FactoryMuffin::define(
|
||||
},
|
||||
'startdate' => 'date',
|
||||
'targetdate' => 'date',
|
||||
'remind_me' => false,
|
||||
'reminder_skip' => 0,
|
||||
'order' => 0,
|
||||
]
|
||||
);
|
||||
|
@ -138,6 +138,8 @@ class PiggyBankRepositoryTest extends TestCase
|
||||
'name' => 'Some piggy',
|
||||
'targetamount' => 100,
|
||||
'order' => 1,
|
||||
'remind_me' => false,
|
||||
'reminder_skip' => 0,
|
||||
|
||||
];
|
||||
|
||||
@ -161,6 +163,8 @@ class PiggyBankRepositoryTest extends TestCase
|
||||
'targetamount' => 100,
|
||||
'create_another' => 1,
|
||||
'order' => 1,
|
||||
'remind_me' => false,
|
||||
'reminder_skip' => 0,
|
||||
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user