diff options
Diffstat (limited to 'tests/FundLab.Api.Tests/StockSellTests.fs')
| -rw-r--r-- | tests/FundLab.Api.Tests/StockSellTests.fs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/FundLab.Api.Tests/StockSellTests.fs b/tests/FundLab.Api.Tests/StockSellTests.fs index 972293a..fb17a50 100644 --- a/tests/FundLab.Api.Tests/StockSellTests.fs +++ b/tests/FundLab.Api.Tests/StockSellTests.fs @@ -129,7 +129,7 @@ type StockSellTests(fixture: PostgresFixture) = let status, fundBody = fund sellQuotes fundId Assert.Equal(200, status) - Assert.Contains("\"availableCash\":\"1480.00\"", fundBody) + Assert.Contains("\"availableCash\":\"480.00\"", fundBody) [<Fact>] member _.``selling all units removes the position row and credits the proceeds``() = @@ -150,7 +150,7 @@ type StockSellTests(fixture: PostgresFixture) = Assert.Contains("\"positions\":[]", positionsBody) let _, fundBody = fund sellQuotes fundId - Assert.Contains("\"availableCash\":\"2200.00\"", fundBody) + Assert.Contains("\"availableCash\":\"1200.00\"", fundBody) [<Fact>] member _.``overselling is rejected with a reason and leaves cash and position unchanged``() = @@ -171,7 +171,7 @@ type StockSellTests(fixture: PostgresFixture) = Assert.Contains("\"quantity\":\"100.00000000\"", positionsBody) let _, fundBody = fund quotes fundId - Assert.Contains("\"availableCash\":\"1000.00\"", fundBody) + Assert.Contains("\"availableCash\":\"0.00\"", fundBody) [<Fact>] member _.``valuation after a partial sale prices only the remaining units``() = @@ -215,7 +215,7 @@ type StockSellTests(fixture: PostgresFixture) = Assert.DoesNotContain("\"quantity\":\"40.00000000\"", positionsBody) let _, fundBody = fund quotes fundId - Assert.Contains("\"availableCash\":\"1300.00\"", fundBody) + Assert.Contains("\"availableCash\":\"300.00\"", fundBody) [<Fact>] member _.``a persisted snapshot price wins over the live quote when selling``() = |
