formatting, juiste use voor UpdateDynamicRequest
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Dynamic;
|
||||
use App\Models\Ledger;
|
||||
use App\Models\Mutation;
|
||||
use App\Models\Message;
|
||||
use App\Models\User;
|
||||
use App\Services\ActivityService;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
@@ -80,7 +79,7 @@ test('dashboard groups and filters unread entities correctly based on cursor', f
|
||||
'user_id' => $user->id,
|
||||
'content' => 'Old message context',
|
||||
]);
|
||||
|
||||
|
||||
// Artificially advance cursor to after past message
|
||||
Carbon::setTestNow(Carbon::now()->addMinutes(5));
|
||||
$service = app(ActivityService::class);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use App\Mail\DynamicInvitationMail;
|
||||
use App\Models\Dynamic;
|
||||
use App\Models\DynamicInvitation;
|
||||
use App\Mail\DynamicInvitationMail;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Dynamic;
|
||||
use App\Models\Ledger;
|
||||
use App\Models\User;
|
||||
|
||||
test('dynamic owners can view ledger creation form and create ledgers', function () {
|
||||
$owner = User::factory()->create();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Dynamic;
|
||||
use App\Models\Ledger;
|
||||
use App\Models\Mutation;
|
||||
use App\Models\Message;
|
||||
use App\Models\Media;
|
||||
use App\Models\Message;
|
||||
use App\Models\Mutation;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Dynamic;
|
||||
use App\Models\Ledger;
|
||||
use App\Models\Mutation;
|
||||
use App\Models\User;
|
||||
|
||||
test('owner can create a mutation which is automatically approved and does not say Approved', function () {
|
||||
$owner = User::factory()->create();
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Dynamic;
|
||||
use App\Models\Ledger;
|
||||
use App\Models\Mutation;
|
||||
use App\Models\User;
|
||||
|
||||
test('authenticated participant can view another participant detail page in dynamic', function () {
|
||||
$owner = User::factory()->create();
|
||||
$participant = User::factory()->create();
|
||||
$dynamic = Dynamic::factory()->create();
|
||||
|
||||
|
||||
$dynamic->participants()->attach($owner->id, ['role' => 'owner', 'display_name' => 'The Boss']);
|
||||
$dynamic->participants()->attach($participant->id, ['role' => 'participant']);
|
||||
|
||||
@@ -34,7 +34,7 @@ test('non-participant cannot view participant detail page in dynamic', function
|
||||
$participant = User::factory()->create();
|
||||
$outsider = User::factory()->create();
|
||||
$dynamic = Dynamic::factory()->create();
|
||||
|
||||
|
||||
$dynamic->participants()->attach($owner->id, ['role' => 'owner']);
|
||||
$dynamic->participants()->attach($participant->id, ['role' => 'participant']);
|
||||
|
||||
@@ -50,7 +50,7 @@ test('participant detail page displays their recent mutations in dynamic', funct
|
||||
$participant = User::factory()->create();
|
||||
$dynamic = Dynamic::factory()->create();
|
||||
$ledger = Ledger::factory()->create(['dynamic_id' => $dynamic->id]);
|
||||
|
||||
|
||||
$dynamic->participants()->attach($owner->id, ['role' => 'owner']);
|
||||
$dynamic->participants()->attach($participant->id, ['role' => 'participant', 'display_name' => 'Bitch']);
|
||||
|
||||
@@ -61,7 +61,7 @@ test('participant detail page displays their recent mutations in dynamic', funct
|
||||
'amount' => 10,
|
||||
'description' => 'Chore 1',
|
||||
]);
|
||||
|
||||
|
||||
$mutation2 = Mutation::factory()->create([
|
||||
'ledger_id' => $ledger->id,
|
||||
'user_id' => $participant->id,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Dynamic;
|
||||
use App\Models\User;
|
||||
|
||||
test('user displayNameFor returns user name by default', function () {
|
||||
$user = User::factory()->create(['name' => 'Alice']);
|
||||
@@ -34,7 +34,7 @@ test('participant can update their display name', function () {
|
||||
]);
|
||||
|
||||
$response->assertRedirect();
|
||||
|
||||
|
||||
// Check database
|
||||
$this->assertDatabaseHas('participants', [
|
||||
'user_id' => $user->id,
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Dynamic;
|
||||
use App\Models\Ledger;
|
||||
use App\Models\PredefinedMutation;
|
||||
use App\Models\User;
|
||||
|
||||
test('owner can view predefined mutations for dynamic', function () {
|
||||
$owner = User::factory()->create();
|
||||
|
||||
Reference in New Issue
Block a user