[chore] make tests more cacheable by avoiding time.Now() (#656)

This commit is contained in:
tobi
2022-06-19 17:10:24 +02:00
committed by GitHub
parent f42d5d807c
commit 610395d5a5
3 changed files with 123 additions and 129 deletions

View File

@@ -21,7 +21,6 @@ package dereferencing_test
import (
"context"
"testing"
"time"
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/gotosocial/internal/ap"
@@ -122,8 +121,6 @@ func (suite *StatusTestSuite) TestDereferenceStatusWithMention() {
suite.Equal(account.ID, m.OriginAccountID)
suite.Equal(fetchingAccount.ID, m.TargetAccountID)
suite.Equal(account.URI, m.OriginAccountURI)
suite.WithinDuration(time.Now(), m.CreatedAt, 5*time.Minute)
suite.WithinDuration(time.Now(), m.UpdatedAt, 5*time.Minute)
suite.False(m.Silent)
}