Skip to content

Commit

Permalink
🩹 Fix lll
Browse files Browse the repository at this point in the history
  • Loading branch information
H1rono committed Nov 8, 2024
1 parent 4cc12ba commit 4bdf341
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion model/transaction_detail_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ func (repo *EntRepository) createTransactionDetail(
}

func (repo *EntRepository) updateTransactionDetail(
ctx context.Context, tx *ent.Tx, transactionID uuid.UUID, title string, amount int, target string,
ctx context.Context, tx *ent.Tx, transactionID uuid.UUID,
title string, amount int, target string,
) (*TransactionDetail, error) {
_, err := tx.Client().TransactionDetail.Update().
Where(transactiondetail.HasTransactionWith(
Expand Down
4 changes: 3 additions & 1 deletion model/transaction_detail_impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ func TestEntRepository_updateTransactionDetail(t *testing.T) {
updateTitle := "Fuga"
updatedAmount := 1000
updatedTarget := "fuga"
td, err := repo.updateTransactionDetail(ctx, tx, trns.ID, updateTitle, updatedAmount, updatedTarget)
td, err := repo.updateTransactionDetail(
ctx, tx, trns.ID,
updateTitle, updatedAmount, updatedTarget)
assert.NoError(t, err)
err = tx.Commit()
assert.NoError(t, err)
Expand Down
4 changes: 3 additions & 1 deletion router/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,9 @@ func TestHandlers_PostTransaction(t *testing.T) {

h.Repository.MockTransactionRepository.
EXPECT().
CreateTransaction(c.Request().Context(), tx1.Title, tx1.Amount, tx1.Target, tags, &group, nil).
CreateTransaction(
c.Request().Context(),
tx1.Title, tx1.Amount, tx1.Target, tags, &group, nil).
Return(tx1, nil)

res := lo.Map(txs, func(tx *model.TransactionResponse, _ int) *Transaction {
Expand Down

0 comments on commit 4bdf341

Please sign in to comment.