2022-04-15 09:42:07 +02:00
|
|
|
package clean
|
2021-12-14 18:34:52 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestHex(t *testing.T) {
|
|
|
|
t.Run("UUID", func(t *testing.T) {
|
|
|
|
assert.Equal(t, "123e4567e89b12d3a456426614174000", Hex("123e4567-e89b-12d3-A456-426614174000 "))
|
|
|
|
})
|
|
|
|
t.Run("ThumbSize", func(t *testing.T) {
|
|
|
|
assert.Equal(t, "ef224", Hex("left_224"))
|
|
|
|
})
|
|
|
|
t.Run("SHA1", func(t *testing.T) {
|
|
|
|
assert.Equal(t, "5c50ae14f339364eb8224f23c2d3abc7e79016f3eaded", Hex("5c50ae14f339364eb8224f23c2d3abc7e79016f3 README.md"))
|
|
|
|
})
|
2023-06-26 15:57:56 +02:00
|
|
|
t.Run("Empty", func(t *testing.T) {
|
|
|
|
assert.Equal(t, "", Hex(""))
|
|
|
|
})
|
2021-12-14 18:34:52 +01:00
|
|
|
}
|