github.com/Team-Kujira/tendermint@v0.34.24-indexer/crypto/armor/armor_test.go (about) 1 package armor 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 "github.com/stretchr/testify/require" 8 ) 9 10 func TestArmor(t *testing.T) { 11 blockType := "MINT TEST" 12 data := []byte("somedata") 13 armorStr := EncodeArmor(blockType, nil, data) 14 15 // Decode armorStr and test for equivalence. 16 blockType2, _, data2, err := DecodeArmor(armorStr) 17 require.Nil(t, err, "%+v", err) 18 assert.Equal(t, blockType, blockType2) 19 assert.Equal(t, data, data2) 20 }