mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 09:14:27 +08:00
code refactor
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package avatars
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/mayswind/ezbookkeeping/pkg/models"
|
||||
)
|
||||
|
||||
func TestGravatarAvatarProvider_GetGravatarUrl(t *testing.T) {
|
||||
avatarProvider := NewGravatarAvatarProvider()
|
||||
|
||||
expectedValue := "https://www.gravatar.com/avatar/0bc83cb571cd1c50ba6f3e8a78ef1346"
|
||||
actualValue := avatarProvider.GetAvatarUrl(&models.User{
|
||||
Email: "MyEmailAddress@example.com",
|
||||
})
|
||||
|
||||
assert.Equal(t, expectedValue, actualValue)
|
||||
}
|
||||
Reference in New Issue
Block a user