Skip to content

Commit

Permalink
test: update credential ep tests
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Kungla <[email protected]>
  • Loading branch information
mkungla committed Apr 10, 2022
1 parent 7f3794c commit b34a385
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions enpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ func TestGetAddressTxsEndpoint(t *testing.T) {
}

func TestGetAddressAssetsEndpoint(t *testing.T) {
expected := []koios.AddressAsset{}
expected := []koios.Asset{}

spec := loadEndpointTestSpec(t, "endpoint_address_assets.json.gz", &expected)

Expand All @@ -499,9 +499,7 @@ func TestGetAddressAssetsEndpoint(t *testing.T) {
}

func TestGetCredentialTxsEndpoint(t *testing.T) {
expected := []struct {
TxHash koios.TxHash `json:"tx_hash"`
}{}
expected := []koios.TX{}

spec := loadEndpointTestSpec(t, "endpoint_credential_txs.json.gz", &expected)

Expand All @@ -521,9 +519,7 @@ func TestGetCredentialTxsEndpoint(t *testing.T) {
assert.NoError(t, err)
testHeaders(t, spec, res.Response)

for _, e := range expected {
assert.Contains(t, res.Data, e.TxHash)
}
assert.Equal(t, expected, res.Data)

res2, err := api.GetCredentialTxs(context.Background(), []koios.PaymentCredential{}, 0, nil)
assert.ErrorIs(t, err, koios.ErrNoAddress)
Expand Down

0 comments on commit b34a385

Please sign in to comment.