Skip to content

Commit

Permalink
Add test to check that no known token is simplified to empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksej-paschenko committed Jan 10, 2024
1 parent e5f223e commit 0175e10
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions jetton_verifier_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package scam_backoffice_rules

import (
"fmt"
"testing"

"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -161,3 +162,18 @@ func TestJettonVerifier_IsSimilarToWellKnownSymbol(t *testing.T) {
})
}
}

func TestJettonVerifier_run(t *testing.T) {
verifier := &JettonVerifier{
jettons: map[string]map[tongo.AccountID]jetton{},
}
knownJettons, err := downloadJettons()
require.Nil(t, err)
verifier.updateJettons(knownJettons)

jettons := verifier.jettons[""]
for _, jetton := range jettons {
fmt.Printf("jetton %v simplified to an empty string\n", jetton.Name)
}
require.Equal(t, 0, len(jettons))
}

0 comments on commit 0175e10

Please sign in to comment.