chore: code style

This commit is contained in:
hackerESQ
2025-01-28 17:14:49 -06:00
parent c4736fae70
commit e8ef0921ad
123 changed files with 1051 additions and 1197 deletions
+6 -11
View File
@@ -2,32 +2,29 @@
namespace Tests;
use Tests\TestCase;
use App\Models\User;
use App\Models\Split;
use App\Models\Holding;
use App\Models\Portfolio;
use App\Models\Split;
use App\Models\Transaction;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
class SplitsTest extends TestCase
{
use RefreshDatabase;
/**
*/
public function test_splits_create_new_transaction(): void
{
$this->actingAs($user = User::factory()->create());
$portfolio = Portfolio::factory()->create();
Transaction::factory()->buy()->yearsAgo()->portfolio($portfolio->id)->symbol('ACME')->create();
// manually reset the split last sync date (which is set when the holding is created)
Holding::query()->portfolio($portfolio->id)->symbol('ACME')->update([
'splits_synced_at' => null
'splits_synced_at' => null,
]);
Split::refreshSplitData('ACME');
$transactions = Transaction::query()->symbol('ACME')->portfolio($portfolio->id)->get();
@@ -35,12 +32,10 @@ class SplitsTest extends TestCase
$this->assertCount(2, $transactions);
}
/**
*/
public function test_splits_do_not_create_new_transaction_if_already_synced(): void
{
$this->actingAs($user = User::factory()->create());
$portfolio = Portfolio::factory()->create();
Transaction::factory()->buy()->yearsAgo()->portfolio($portfolio->id)->symbol('ACME')->create();