summaryrefslogtreecommitdiff
path: root/internal/trans/trans_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-08-22 11:21:36 +0200
committerLibravatar GitHub <noreply@github.com>2022-08-22 11:21:36 +0200
commitb96533ca8f4d155e87e5325b4b192894d7d3e077 (patch)
tree936fc6fa01dd98a78adc4396e6e289bddf8344bc /internal/trans/trans_test.go
parent[bugfix] Fix potential dereference of accounts on own instance (#757) (diff)
downloadgotosocial-b96533ca8f4d155e87e5325b4b192894d7d3e077.tar.xz
[bugfix] Fix loss of account info on export/import, add tests (#759)
* start adding additional tests * use random database address for in-memory sqlite * add more fields to account export
Diffstat (limited to 'internal/trans/trans_test.go')
-rw-r--r--internal/trans/trans_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/trans/trans_test.go b/internal/trans/trans_test.go
index f7b85af1b..4eedf5703 100644
--- a/internal/trans/trans_test.go
+++ b/internal/trans/trans_test.go
@@ -21,17 +21,22 @@ package trans_test
import (
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/gotosocial/internal/db"
+ "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/testrig"
)
type TransTestSuite struct {
suite.Suite
- db db.DB
+ db db.DB
+ testAccounts map[string]*gtsmodel.Account
}
func (suite *TransTestSuite) SetupTest() {
- testrig.InitTestLog()
testrig.InitTestConfig()
+ testrig.InitTestLog()
+
+ suite.testAccounts = testrig.NewTestAccounts()
+
suite.db = testrig.NewTestDB()
testrig.StandardDBSetup(suite.db, nil)
}