Skip to content

Commit

Permalink
Fix linter - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya1702 committed Dec 13, 2024
1 parent 1507d34 commit 46a469a
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions cmd/stellar-rpc/internal/methods/get_transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,10 @@ func TestGetTransactions_DefaultLimitExceedsLatestLedger(t *testing.T) {

response, err := handler.getTransactionsByLedgerSequence(context.TODO(), request)
require.NoError(t, err)

// assert latest ledger details
assert.Equal(t, uint32(3), response.LatestLedger)
assert.Equal(t, int64(175), response.LatestLedgerCloseTime)

// assert pagination
assert.Equal(t, toid.New(3, 2, 1).String(), response.Cursor)

// assert transactions result
assert.Len(t, response.Transactions, 6)

// assert the transaction structure. We will match only 1 tx for sanity purposes.
assert.Equal(t, expectedTransactionInfo, response.Transactions[0])
}

Expand All @@ -149,20 +141,12 @@ func TestGetTransactions_CustomLimit(t *testing.T) {

response, err := handler.getTransactionsByLedgerSequence(context.TODO(), request)
require.NoError(t, err)

// assert latest ledger details
assert.Equal(t, uint32(10), response.LatestLedger)
assert.Equal(t, int64(350), response.LatestLedgerCloseTime)

// assert pagination
assert.Equal(t, toid.New(1, 2, 1).String(), response.Cursor)

// assert transactions result
assert.Len(t, response.Transactions, 2)
assert.Equal(t, uint32(1), response.Transactions[0].Ledger)
assert.Equal(t, uint32(1), response.Transactions[1].Ledger)

// assert the transaction structure. We will match only 1 tx for sanity purposes.
assert.Equal(t, expectedTransactionInfo, response.Transactions[0])
}

Expand All @@ -184,15 +168,9 @@ func TestGetTransactions_CustomLimitAndCursor(t *testing.T) {

response, err := handler.getTransactionsByLedgerSequence(context.TODO(), request)
require.NoError(t, err)

// assert latest ledger details
assert.Equal(t, uint32(10), response.LatestLedger)
assert.Equal(t, int64(350), response.LatestLedgerCloseTime)

// assert pagination
assert.Equal(t, toid.New(3, 1, 1).String(), response.Cursor)

// assert transactions result
assert.Len(t, response.Transactions, 3)
assert.Equal(t, uint32(2), response.Transactions[0].Ledger)
assert.Equal(t, uint32(2), response.Transactions[1].Ledger)
Expand Down

0 comments on commit 46a469a

Please sign in to comment.