mirror of
https://github.com/kovetskiy/mark.git
synced 2026-05-04 06:22:35 +00:00
fix: resolve link space inheritance and enhance Confluence URL normalization tests
Signed-off-by: Nikolai Emil Damm <ndam@tv2.dk>
This commit is contained in:
committed by
Manuel Rüger
parent
0dd5ea9aee
commit
ef560d095c
@@ -54,13 +54,13 @@ func TestParseLinks(t *testing.T) {
|
||||
|
||||
func TestNormalizeConfluenceWebUIPath(t *testing.T) {
|
||||
t.Run("confluence-cloud-experience-prefix", func(t *testing.T) {
|
||||
input := "/ex/confluence/05532958-2d1d-4f01-2027-90926d8b54d5/wiki/spaces/MySpace/pages/2441299827/TEST"
|
||||
expected := "/wiki/spaces/MySpace/pages/2441299827/TEST"
|
||||
input := "/ex/confluence/cloud-id/wiki/spaces/SPACE/pages/12345/PageName"
|
||||
expected := "/wiki/spaces/SPACE/pages/12345/PageName"
|
||||
assert.Equal(t, expected, normalizeConfluenceWebUIPath(input))
|
||||
})
|
||||
|
||||
t.Run("already-canonical-wiki", func(t *testing.T) {
|
||||
input := "/wiki/spaces/MySpace/pages/2441299827/TEST"
|
||||
input := "/wiki/spaces/SPACE/pages/12345/PageName"
|
||||
assert.Equal(t, input, normalizeConfluenceWebUIPath(input))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user