summaryrefslogtreecommitdiff
path: root/internal/text/markdown_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-11-22 11:49:11 +0100
committerLibravatar GitHub <noreply@github.com>2021-11-22 11:49:11 +0100
commit24f9e1122111a73fbd49c46e0f137ddb0f5d45eb (patch)
tree1b0ef83ac79ec13bdb015837f05d1144a293a333 /internal/text/markdown_test.go
parentadd bindAddress configuration option (#320) (diff)
downloadgotosocial-24f9e1122111a73fbd49c46e0f137ddb0f5d45eb.tar.xz
Fix image description unnecessarily html-escaping innocent characters (#321)
* implement SanitizeCaption function * tidy up text test setup
Diffstat (limited to 'internal/text/markdown_test.go')
-rw-r--r--internal/text/markdown_test.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/internal/text/markdown_test.go b/internal/text/markdown_test.go
index 3faa69c08..0c55cba9c 100644
--- a/internal/text/markdown_test.go
+++ b/internal/text/markdown_test.go
@@ -25,8 +25,6 @@ import (
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
- "github.com/superseriousbusiness/gotosocial/internal/text"
- "github.com/superseriousbusiness/gotosocial/testrig"
)
const (
@@ -67,30 +65,6 @@ type MarkdownTestSuite struct {
TextStandardTestSuite
}
-func (suite *MarkdownTestSuite) SetupSuite() {
- suite.testTokens = testrig.NewTestTokens()
- suite.testClients = testrig.NewTestClients()
- suite.testApplications = testrig.NewTestApplications()
- suite.testUsers = testrig.NewTestUsers()
- suite.testAccounts = testrig.NewTestAccounts()
- suite.testAttachments = testrig.NewTestAttachments()
- suite.testStatuses = testrig.NewTestStatuses()
- suite.testTags = testrig.NewTestTags()
- suite.testMentions = testrig.NewTestMentions()
-}
-
-func (suite *MarkdownTestSuite) SetupTest() {
- suite.config = testrig.NewTestConfig()
- suite.db = testrig.NewTestDB()
- suite.formatter = text.NewFormatter(suite.config, suite.db)
-
- testrig.StandardDBSetup(suite.db, suite.testAccounts)
-}
-
-func (suite *MarkdownTestSuite) TearDownTest() {
- testrig.StandardDBTeardown(suite.db)
-}
-
func (suite *MarkdownTestSuite) TestParseSimple() {
s := suite.formatter.FromMarkdown(context.Background(), simpleMarkdown, nil, nil)
suite.Equal(simpleMarkdownExpected, s)