mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
New test to cover some reminder stuff.
This commit is contained in:
@@ -87,6 +87,27 @@ class ReminderHelperTest extends TestCase
|
|||||||
$this->assertEquals(0, $result->metadata->leftToSave);
|
$this->assertEquals(0, $result->metadata->leftToSave);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function testCreateReminders()
|
||||||
|
{
|
||||||
|
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
|
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||||
|
$piggyBank->account_id = $account->id;
|
||||||
|
$piggyBank->startdate = new Carbon('2015-01-01');
|
||||||
|
$piggyBank->targetdate = new Carbon('2015-12-31');
|
||||||
|
$piggyBank->reminder = 'monthly';
|
||||||
|
$piggyBank->remind_me = true;
|
||||||
|
$piggyBank->save();
|
||||||
|
$this->be($account->user);
|
||||||
|
|
||||||
|
$this->object->createReminders($piggyBank, new Carbon('2015-05-05'));
|
||||||
|
|
||||||
|
$this->assertCount(1, $piggyBank->reminders()->get());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function testGetReminderRangesNull()
|
public function testGetReminderRangesNull()
|
||||||
{
|
{
|
||||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||||
|
Reference in New Issue
Block a user