simplify tests and daily change calculations

This commit is contained in:
hackerESQ
2024-09-23 15:09:35 -05:00
parent d0fbf44fa0
commit 7d119a8c24
8 changed files with 77 additions and 65 deletions
+2 -2
View File
@@ -21,8 +21,8 @@ class CaptureDailyChangeTest extends TestCase
$this->actingAs($user = User::factory()->create());
$this->portfolio = Portfolio::factory()->create();
Transaction::factory(5)->buy()->portfolio($this->portfolio->id)->symbol('AAPL')->create();
$this->transaction = Transaction::factory()->sell()->portfolio($this->portfolio->id)->symbol('AAPL')->create();
Transaction::factory(5)->buy()->lastYear()->portfolio($this->portfolio->id)->symbol('AAPL')->create();
$this->transaction = Transaction::factory()->sell()->lastMonth()->portfolio($this->portfolio->id)->symbol('AAPL')->create();
}
/**