From ad7fb7cd4421c65dffd45229dd56cf824c771ab8 Mon Sep 17 00:00:00 2001 From: Gustavo Martinez Date: Wed, 23 Jun 2021 22:52:55 -0500 Subject: [PATCH] Fixed bug that wasn't sending the instance to the confirmation message function --- src/Actions/Action.php | 6 +----- tests/Feature/ExecuteActionsTest.php | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Actions/Action.php b/src/Actions/Action.php index 6662cd9..7bd5e1d 100644 --- a/src/Actions/Action.php +++ b/src/Actions/Action.php @@ -69,10 +69,6 @@ private function setMessage($type = 'success', $message = null) public function shouldBeConfirmed() { - if (method_exists($this, 'getConfirmationMessage')) { - return !empty($this->getConfirmationMessage(null)); - } - - return false; + return method_exists($this, 'getConfirmationMessage'); } } diff --git a/tests/Feature/ExecuteActionsTest.php b/tests/Feature/ExecuteActionsTest.php index dc8954e..c3d0a82 100644 --- a/tests/Feature/ExecuteActionsTest.php +++ b/tests/Feature/ExecuteActionsTest.php @@ -64,6 +64,8 @@ public function testSeeConfirmationMessage() ]); } + // TODO: test custom confirmation message + public function testCallActionAfterConfirmationMessage() { $user = factory(UserTest::class)->create();