Skip to content

Commit

Permalink
test: use v3 testing methods for v3 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
morremeyer committed Nov 23, 2023
1 parent 375dc49 commit cb06aa4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/controllers/transaction_v3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,20 @@ func (suite *TestSuiteStandard) TestTransactionsV3DatabaseError() {
// not correctly sorted when multiple transactions occurred on a day. In that case, the
// oldest transaction would be at the bottom and not at the top.
func (suite *TestSuiteStandard) TestTransactionsV3Get() {
t1 := suite.createTestTransaction(models.TransactionCreate{
t1 := suite.createTestTransactionV3(models.TransactionCreate{
Amount: decimal.NewFromFloat(17.23),
Date: time.Date(2023, 11, 10, 10, 11, 12, 0, time.UTC),
})

_ = suite.createTestTransaction(models.TransactionCreate{
_ = suite.createTestTransactionV3(models.TransactionCreate{
Amount: decimal.NewFromFloat(23.42),
Date: time.Date(2023, 11, 10, 11, 12, 13, 0, time.UTC),
})

// Need to sleep 1 second because SQLite datetime only has second precision
time.Sleep(1 * time.Second)

t3 := suite.createTestTransaction(models.TransactionCreate{
t3 := suite.createTestTransactionV3(models.TransactionCreate{
Amount: decimal.NewFromFloat(44.05),
Date: time.Date(2023, 11, 10, 10, 11, 12, 0, time.UTC),
})
Expand Down Expand Up @@ -164,7 +164,7 @@ func (suite *TestSuiteStandard) TestTransactionsV3GetFilter() {
e1ID := &e1.Data.ID
e2ID := &e2.Data.ID

_ = suite.createTestTransaction(models.TransactionCreate{
_ = suite.createTestTransactionV3(models.TransactionCreate{
Date: time.Date(2018, 9, 5, 17, 13, 29, 45256, time.UTC),
Amount: decimal.NewFromFloat(2.718),
Note: "This was an important expense",
Expand All @@ -177,7 +177,7 @@ func (suite *TestSuiteStandard) TestTransactionsV3GetFilter() {
ReconciledDestination: false,
})

_ = suite.createTestTransaction(models.TransactionCreate{
_ = suite.createTestTransactionV3(models.TransactionCreate{
Date: time.Date(2016, 5, 1, 14, 13, 25, 584575, time.UTC),
Amount: decimal.NewFromFloat(11235.813),
Note: "Not important",
Expand All @@ -190,7 +190,7 @@ func (suite *TestSuiteStandard) TestTransactionsV3GetFilter() {
ReconciledDestination: true,
})

_ = suite.createTestTransaction(models.TransactionCreate{
_ = suite.createTestTransactionV3(models.TransactionCreate{
Date: time.Date(2021, 2, 6, 5, 1, 0, 585, time.UTC),
Amount: decimal.NewFromFloat(2.718),
Note: "",
Expand Down

0 comments on commit cb06aa4

Please sign in to comment.