Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Improved tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazarii-4chain committed Jan 26, 2024
1 parent e1dfbab commit 7ca3886
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions action_transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,30 @@ func Test_RevertTransaction(t *testing.T) {
})
}

func Test_RecordTransaction(t *testing.T) {
//var secondTransaction *Transaction
ctx, client, _ := initSimpleTestCase(t)
draftTransaction := newDraftTransaction(
testXPub, &TransactionConfig{
Outputs: []*TransactionOutput{{
To: "1A1PjKqjWMNBzTVdcBru27EV1PHcXWc63W",
Satoshis: 1000,
}},
ChangeNumberOfDestinations: 1,
Sync: &SyncConfig{
Broadcast: true,
BroadcastInstant: false,
PaymailP2P: false,
SyncOnChain: false,
},
},
append(client.DefaultModelOptions(), New())...,
)

_, err := client.RecordTransaction(ctx, testXPub, "test", draftTransaction.ID, client.DefaultModelOptions()...)
require.Error(t, err)
}

func initRevertTransactionData(t *testing.T) (context.Context, ClientInterface, *Transaction, *bip32.ExtendedKey, func()) {
// this creates an xpub, destination and utxo
ctx, client, deferMe := initSimpleTestCase(t)
Expand Down

0 comments on commit 7ca3886

Please sign in to comment.