From 24f9e1122111a73fbd49c46e0f137ddb0f5d45eb Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 22 Nov 2021 11:49:11 +0100 Subject: Fix image description unnecessarily html-escaping innocent characters (#321) * implement SanitizeCaption function * tidy up text test setup --- internal/text/plain_test.go | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'internal/text/plain_test.go') diff --git a/internal/text/plain_test.go b/internal/text/plain_test.go index b353fb284..b8a50d3a1 100644 --- a/internal/text/plain_test.go +++ b/internal/text/plain_test.go @@ -26,8 +26,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" - "github.com/superseriousbusiness/gotosocial/internal/text" - "github.com/superseriousbusiness/gotosocial/testrig" ) const ( @@ -49,30 +47,6 @@ type PlainTestSuite struct { TextStandardTestSuite } -func (suite *PlainTestSuite) 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 *PlainTestSuite) SetupTest() { - suite.config = testrig.NewTestConfig() - suite.db = testrig.NewTestDB() - suite.formatter = text.NewFormatter(suite.config, suite.db) - - testrig.StandardDBSetup(suite.db, nil) -} - -func (suite *PlainTestSuite) TearDownTest() { - testrig.StandardDBTeardown(suite.db) -} - func (suite *PlainTestSuite) TestParseSimple() { f := suite.formatter.FromPlain(context.Background(), simple, nil, nil) assert.Equal(suite.T(), simpleExpected, f) -- cgit v1.2.3