mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 21:02:25 -06:00
[chore] make tests more cacheable by avoiding time.Now() (#656)
This commit is contained in:
parent
f42d5d807c
commit
610395d5a5
3 changed files with 123 additions and 129 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue