mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
fix gravatar url is invalid when email contains upper characters
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestGetGravatarUrl(t *testing.T) {
|
||||
// Reference: https://en.gravatar.com/site/implement/hash/
|
||||
expectedValue := "https://www.gravatar.com/avatar/0bc83cb571cd1c50ba6f3e8a78ef1346"
|
||||
actualValue := GetGravatarUrl("MyEmailAddress@example.com")
|
||||
assert.Equal(t, expectedValue, actualValue)
|
||||
}
|
||||
Reference in New Issue
Block a user