generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework the admin configuration to be a more general draft paths option
- Loading branch information
Kurt Friars
committed
Mar 8, 2024
1 parent
e003a7d
commit d750c11
Showing
8 changed files
with
75 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
use function Pest\Laravel\get; | ||
|
||
it('correctly forces draft content on the configured draft_paths', function () { | ||
get('pages/1')->assertSee('Draft Content Restricted'); | ||
get('admin')->assertSee('Draft Content Visible'); | ||
get('admin/dashboard')->assertSee('Draft Content Visible'); | ||
get('admin/resources/pages/1/details')->assertSee('Draft Content Visible'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Tests\Helpers\Controllers; | ||
|
||
use Illuminate\Routing\Controller; | ||
use Plank\Publisher\Facades\Publisher; | ||
|
||
class TestController extends Controller | ||
{ | ||
public function test() | ||
{ | ||
if (Publisher::draftContentAllowed()) { | ||
return response('Draft Content Visible'); | ||
} | ||
|
||
return response('Draft Content Restricted'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters