formatting, juiste use voor UpdateDynamicRequest
This commit is contained in:
@@ -4,7 +4,6 @@ namespace Tests\Browser;
|
||||
|
||||
use App\Models\User;
|
||||
use Laravel\Dusk\Browser;
|
||||
use Tests\DuskTestCase;
|
||||
|
||||
test('user can register, log in, and log out', function () {
|
||||
$this->browse(function (Browser $browser) {
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
|
||||
namespace Tests\Browser;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Dynamic;
|
||||
use App\Models\Ledger;
|
||||
use App\Models\Mutation;
|
||||
use App\Models\User;
|
||||
use Laravel\Dusk\Browser;
|
||||
use Tests\DuskTestCase;
|
||||
|
||||
test('access control and actions are enforced for owners and participants', function () {
|
||||
// Create database state
|
||||
@@ -46,7 +45,7 @@ test('access control and actions are enforced for owners and participants', func
|
||||
]);
|
||||
|
||||
$this->browse(function (Browser $sessionOwner, Browser $sessionParticipant, Browser $sessionOutsider) use ($dynamic, $ledger, $owner, $participant, $outsider) {
|
||||
|
||||
|
||||
// 1. Test Outsider trying to access dynamic they DO NOT belong to (should be forbidden / 403)
|
||||
$sessionOutsider->loginAs($outsider)
|
||||
->visit(route('dynamics.show', $dynamic))
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
|
||||
namespace Tests\Browser;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Dynamic;
|
||||
use App\Models\Ledger;
|
||||
use App\Models\User;
|
||||
use Laravel\Dusk\Browser;
|
||||
use Tests\DuskTestCase;
|
||||
|
||||
test('multiple sessions can communicate in real time through websockets', function () {
|
||||
// 1. Create realistic database state
|
||||
@@ -15,7 +13,7 @@ test('multiple sessions can communicate in real time through websockets', functi
|
||||
'email' => 'test-owner@example.com',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
|
||||
|
||||
$participant = User::factory()->create([
|
||||
'name' => 'Submissive Bob',
|
||||
'email' => 'test-sub@example.com',
|
||||
@@ -32,7 +30,7 @@ test('multiple sessions can communicate in real time through websockets', functi
|
||||
|
||||
// 2. Spawn two separate browser sessions/browsers in parallel
|
||||
$this->browse(function (Browser $sessionA, Browser $sessionB) use ($dynamic, $owner, $participant) {
|
||||
|
||||
|
||||
// --- SESSION A: Owner ---
|
||||
$sessionA->loginAs($owner)
|
||||
->visit(route('dynamics.show', $dynamic))
|
||||
|
||||
Reference in New Issue
Block a user