Fix actions and associated tests.

This commit is contained in:
James Cole
2020-08-23 16:12:16 +02:00
parent 139b3ffab4
commit fecc9f7659
8 changed files with 286 additions and 318 deletions

View File

@@ -33,16 +33,6 @@ use Tests\TestCase;
*/
class SetNotesTest extends TestCase
{
/**
* Set up test
*/
public function setUp(): void
{
self::markTestIncomplete('Incomplete for refactor.');
return;
}
/**
* @covers \FireflyIII\TransactionRules\Actions\SetNotes
*/
@@ -61,7 +51,7 @@ class SetNotesTest extends TestCase
// fire the action:
$ruleAction = new RuleAction;
$ruleAction->action_value = 'These are new notes ' . $this->randomInt();
$ruleAction->action_value = sprintf('These are new notes #%d', $this->randomInt());
$action = new SetNotes($ruleAction);
$result = $action->act($journal);
$this->assertTrue($result);
@@ -69,6 +59,7 @@ class SetNotesTest extends TestCase
// assert result
$this->assertEquals(1, $journal->notes()->count());
$this->assertEquals($note->id, $journal->notes()->first()->id);
$journal->notes()->delete();
}
/**