fix: network version info test
package hedera
import (
- "fmt"
"github.com/stretchr/testify/assert"
"testing"
)
@@ -12,10 +11,7 @@ func TestNetworkVersionInfoQuery_Execute(t *testing.T) {
_, err := NewNetworkVersionQuery().
SetMaxQueryPayment(NewHbar(1)).
Execute(client)
- assert.Error(t, err)
- if err != nil {
- assert.Equal(t, fmt.Sprintf("exceptional precheck status NOT_SUPPORTED"), err.Error())
- }
+ assert.NoError(t, err)
}
func TestNetworkVersionInfoQueryCost_Execute(t *testing.T) {
@@ -24,11 +20,8 @@ func TestNetworkVersionInfoQueryCost_Execute(t *testing.T) {
query := NewNetworkVersionQuery()
cost, err := query.GetCost(client)
- assert.Error(t, err)
+ assert.NoError(t, err)
_, err = query.SetQueryPayment(cost).Execute(client)
- assert.Error(t, err)
- if err != nil {
- assert.Equal(t, fmt.Sprintf("exceptional precheck status NOT_SUPPORTED"), err.Error())
- }
+ assert.NoError(t, err)
}
