Skip to content

Commit

Permalink
rename sendFlags -> flags
Browse files Browse the repository at this point in the history
  • Loading branch information
bjartek committed Oct 25, 2023
1 parent f6065d5 commit b1331ce
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions internal/transactions/transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,24 +192,24 @@ func Test_Send(t *testing.T) {
})

t.Run("Fail signer not used and payer flag not set", func(t *testing.T) {
sendFlags.Payer = ""
sendFlags.Proposer = config.DefaultEmulator.ServiceAccount
flags.Payer = ""
flags.Proposer = config.DefaultEmulator.ServiceAccount
_, err := send([]string{""}, command.GlobalFlags{}, util.NoLogger, srv.Mock, state)
assert.EqualError(t, err, "proposer/payer flags are required when signer flag is not used")
sendFlags.Signer = "" // reset
flags.Signer = "" // reset
})

t.Run("Fail signer not used and proposer flag not set", func(t *testing.T) {
sendFlags.Proposer = ""
sendFlags.Payer = config.DefaultEmulator.ServiceAccount
flags.Proposer = ""
flags.Payer = config.DefaultEmulator.ServiceAccount
_, err := send([]string{""}, command.GlobalFlags{}, util.NoLogger, srv.Mock, state)
assert.EqualError(t, err, "proposer/payer flags are required when signer flag is not used")
sendFlags.Signer = "" // reset
flags.Signer = "" // reset
})

t.Run("Fail loading transaction file", func(t *testing.T) {
sendFlags.Proposer = config.DefaultEmulator.ServiceAccount
sendFlags.Payer = config.DefaultEmulator.ServiceAccount
flags.Proposer = config.DefaultEmulator.ServiceAccount
flags.Payer = config.DefaultEmulator.ServiceAccount
_, err := send([]string{"invalid"}, command.GlobalFlags{}, util.NoLogger, srv.Mock, state)
assert.EqualError(t, err, "error loading transaction file: open invalid: file does not exist")
})
Expand Down

0 comments on commit b1331ce

Please sign in to comment.