summaryrefslogtreecommitdiff
path: root/internal/typeutils/internaltoas_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-14 12:23:56 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-14 12:23:56 +0200
commit2e5dcc2929d6e6b22f370bf1b83c54d03ac1cd43 (patch)
tree3d3ce087220f8eb120e9fb132731fd30987d9922 /internal/typeutils/internaltoas_test.go
parentadd ap logo to readme (#228) (diff)
downloadgotosocial-2e5dcc2929d6e6b22f370bf1b83c54d03ac1cd43.tar.xz
Fix mentions not notifying (#230)
* set default privacy for new accounts * teshts * found it * tiny change * aaaa
Diffstat (limited to 'internal/typeutils/internaltoas_test.go')
-rw-r--r--internal/typeutils/internaltoas_test.go27
1 files changed, 2 insertions, 25 deletions
diff --git a/internal/typeutils/internaltoas_test.go b/internal/typeutils/internaltoas_test.go
index de046fe0a..50f92e043 100644
--- a/internal/typeutils/internaltoas_test.go
+++ b/internal/typeutils/internaltoas_test.go
@@ -27,37 +27,14 @@ import (
"github.com/go-fed/activity/streams"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
-
- "github.com/superseriousbusiness/gotosocial/internal/typeutils"
- "github.com/superseriousbusiness/gotosocial/testrig"
)
type InternalToASTestSuite struct {
- ConverterStandardTestSuite
-}
-
-// SetupSuite sets some variables on the suite that we can use as consts (more or less) throughout
-func (suite *InternalToASTestSuite) SetupSuite() {
- // setup standard items
- suite.config = testrig.NewTestConfig()
- suite.db = testrig.NewTestDB()
- suite.log = testrig.NewTestLog()
- suite.accounts = testrig.NewTestAccounts()
- suite.people = testrig.NewTestFediPeople()
- suite.typeconverter = typeutils.NewConverter(suite.config, suite.db, suite.log)
-}
-
-func (suite *InternalToASTestSuite) SetupTest() {
- testrig.StandardDBSetup(suite.db, nil)
-}
-
-// TearDownTest drops tables to make sure there's no data in the db
-func (suite *InternalToASTestSuite) TearDownTest() {
- testrig.StandardDBTeardown(suite.db)
+ TypeUtilsTestSuite
}
func (suite *InternalToASTestSuite) TestAccountToAS() {
- testAccount := suite.accounts["local_account_1"] // take zork for this test
+ testAccount := suite.testAccounts["local_account_1"] // take zork for this test
asPerson, err := suite.typeconverter.AccountToAS(context.Background(), testAccount)
assert.NoError(suite.T(), err)