summaryrefslogtreecommitdiff
path: root/internal/processing/account/alias_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-01-20 12:45:43 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-20 12:45:43 +0100
commitb2cacd6b0188f983d1b99f968dfa465a98c9f925 (patch)
treeb8d18486b100e627721010c03355751e123e9d2e /internal/processing/account/alias_test.go
parent[bugfix] Ensure domain block side effects skipped if allow in place (blocklis... (diff)
downloadgotosocial-b2cacd6b0188f983d1b99f968dfa465a98c9f925.tar.xz
[bugfix] Prevent URL + URI for same account being used as alias target (#2545)
* [bugfix] Ensure URL and URI for same account can't both be provided as alias * test whoopsie from previous PR
Diffstat (limited to 'internal/processing/account/alias_test.go')
-rw-r--r--internal/processing/account/alias_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/processing/account/alias_test.go b/internal/processing/account/alias_test.go
index 9be5721aa..80fdb81c1 100644
--- a/internal/processing/account/alias_test.go
+++ b/internal/processing/account/alias_test.go
@@ -132,6 +132,17 @@ func (suite *AliasTestSuite) TestAliasAccount() {
"http://localhost:8080/users/admin",
},
},
+ // Alias zork to turtle using both URI and URL
+ // for turtle. Only URI should end up being used.
+ {
+ newAliases: []string{
+ "http://localhost:8080/users/1happyturtle",
+ "http://localhost:8080/@1happyturtle",
+ },
+ expectedAliases: []string{
+ "http://localhost:8080/users/1happyturtle",
+ },
+ },
} {
var (
ctx = context.Background()