summaryrefslogtreecommitdiff
path: root/internal/util/statustools_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-30 18:11:57 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-30 18:11:57 +0200
commit28b6ce59d6e19603605f259317a9387db15505bb (patch)
tree8bc3cc4ffee12c0ac7e2945ff64df6989c7d4fb8 /internal/util/statustools_test.go
parentallow dereferencing of groups (#256) (diff)
downloadgotosocial-28b6ce59d6e19603605f259317a9387db15505bb.tar.xz
don't catch mentions within links (#257)
Diffstat (limited to 'internal/util/statustools_test.go')
-rw-r--r--internal/util/statustools_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/util/statustools_test.go b/internal/util/statustools_test.go
index 447315b25..74e0e49fd 100644
--- a/internal/util/statustools_test.go
+++ b/internal/util/statustools_test.go
@@ -30,6 +30,17 @@ type StatusTestSuite struct {
suite.Suite
}
+func (suite *StatusTestSuite) TestLinkNoMention() {
+ statusText := `here's a link to a post by zork:
+
+https://localhost:8080/@the_mighty_zork/statuses/01FGVP55XMF2K6316MQRX6PFG1
+
+that link shouldn't come out formatted as a mention!`
+
+ menchies := util.DeriveMentionsFromText(statusText)
+ suite.Empty(menchies)
+}
+
func (suite *StatusTestSuite) TestDeriveMentionsOK() {
statusText := `@dumpsterqueer@example.org testing testing