Skip to content

Commit

Permalink
Fix bytes_to_hex test
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcgary committed Sep 10, 2024
1 parent 4790cd9 commit 336f218
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/sqlite/sqlite_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package sqlite

import (
"encoding/hex"
"github.com/stretchr/testify/assert"
"strings"
"testing"
)

Expand Down Expand Up @@ -37,7 +39,10 @@ func Test_Sqlite(t *testing.T) {

hexValue := &results{}
res := grm.Raw(query).Scan(&hexValue)

expectedBytes := []byte{218, 200, 138, 86, 38, 9, 156, 119, 73, 13, 168, 40, 209, 43, 238, 83, 234, 177, 230, 73, 120, 205, 255, 143, 255, 216, 51, 209, 137, 100, 163, 233}

assert.Nil(t, res.Error)
assert.Equal(t, "dac88a5626099c77490da828d12be653eab1e64978cdff8fffD337d18964a3e9", hexValue.WithdrawalHex)
assert.Equal(t, strings.ToLower(hex.EncodeToString(expectedBytes)), hexValue.WithdrawalHex)
})
}

0 comments on commit 336f218

Please sign in to comment.