mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] make tests more cacheable by avoiding time.Now() (#656)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user