diff --git a/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/model/BranchHomeLinkViewModel.kt b/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/model/BranchHomeLinkViewModel.kt index e60c7352..3015fc34 100644 --- a/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/model/BranchHomeLinkViewModel.kt +++ b/src/main/kotlin/nl/avisi/structurizr/site/generatr/site/model/BranchHomeLinkViewModel.kt @@ -7,5 +7,5 @@ data class BranchHomeLinkViewModel( private val branchName: String ) { val title get() = branchName - val relativeHref get() = HomePageViewModel.url().asUrlToDirectory(pageViewModel.url) + "../$branchName" + val relativeHref get() = HomePageViewModel.url().asUrlToDirectory(pageViewModel.url) + "../$branchName/" } diff --git a/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/BranchHomeLinkViewModelTest.kt b/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/BranchHomeLinkViewModelTest.kt index c27cc904..cb010ffe 100644 --- a/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/BranchHomeLinkViewModelTest.kt +++ b/src/test/kotlin/nl/avisi/structurizr/site/generatr/site/model/BranchHomeLinkViewModelTest.kt @@ -19,7 +19,7 @@ class BranchHomeLinkViewModelTest : ViewModelTest() { val viewModel = BranchHomeLinkViewModel(pageViewModel("/master/decisions/1"), "branch-1") assertThat(viewModel.relativeHref) - .isEqualTo("../../../../branch-1") + .isEqualTo("../../../../branch-1/") } @Test @@ -27,6 +27,6 @@ class BranchHomeLinkViewModelTest : ViewModelTest() { val viewModel = BranchHomeLinkViewModel(pageViewModel("/"), "master") assertThat(viewModel.relativeHref) - .isEqualTo("./../master") + .isEqualTo("./../master/") } }