mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 02:24:03 +00:00
Merge pull request #1053 from andreynering/do-not-test-libravatar
Remove test that touch network
This commit is contained in:
commit
c4a3d5148d
|
@ -1,15 +1,14 @@
|
||||||
package base
|
package base
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
"github.com/Unknwon/i18n"
|
"github.com/Unknwon/i18n"
|
||||||
macaroni18n "github.com/go-macaron/i18n"
|
macaroni18n "github.com/go-macaron/i18n"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"os"
|
|
||||||
"strk.kbt.io/projects/go/libravatar"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var BaseDate time.Time
|
var BaseDate time.Time
|
||||||
|
@ -139,17 +138,6 @@ func TestAvatarLink(t *testing.T) {
|
||||||
"353cbad9b58e69c96154ad99f92bedc7",
|
"353cbad9b58e69c96154ad99f92bedc7",
|
||||||
AvatarLink("gitea@example.com"),
|
AvatarLink("gitea@example.com"),
|
||||||
)
|
)
|
||||||
|
|
||||||
setting.EnableFederatedAvatar = true
|
|
||||||
assert.Equal(t,
|
|
||||||
"353cbad9b58e69c96154ad99f92bedc7",
|
|
||||||
AvatarLink("gitea@example.com"),
|
|
||||||
)
|
|
||||||
setting.LibravatarService = libravatar.New()
|
|
||||||
assert.Equal(t,
|
|
||||||
"http://cdn.libravatar.org/avatar/353cbad9b58e69c96154ad99f92bedc7",
|
|
||||||
AvatarLink("gitea@example.com"),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestComputeTimeDiff(t *testing.T) {
|
func TestComputeTimeDiff(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue