mirror of
https://github.com/status-im/status-go.git
synced 2025-01-15 01:05:06 +00:00
87ce6cfbcd
Main changes: - extend DB query include status for transactions and pending_transactions - extend DB query to aggregate data from complex activity entries - extend tests to include the new status values Other changes: - Improve tests with mocked addresses in DB to have a true to/from state Update status-desktop #10746
20 lines
391 B
Go
20 lines
391 B
Go
package accounts
|
|
|
|
import (
|
|
"database/sql"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func MockTestAccounts(t *testing.T, db *sql.DB, accounts []*Account) {
|
|
d, err := NewDB(db)
|
|
require.NoError(t, err)
|
|
|
|
err = d.SaveOrUpdateAccounts(accounts)
|
|
require.NoError(t, err)
|
|
res, err := d.GetAccounts()
|
|
require.NoError(t, err)
|
|
require.Equal(t, accounts[0].Address, res[0].Address)
|
|
}
|